From 9269ec6dd8b7ed8122dfaff9e3c117818f3c50be Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Mon, 25 Apr 2016 11:44:45 +0100 Subject: trivial: Try to shut up libasn We could be using junk data using @search, but it's immediately overwritten with memset() so it's totally harmless. --- libappstream-glib/as-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libappstream-glib/as-utils.c b/libappstream-glib/as-utils.c index 7e19ea6..f1588e9 100644 --- a/libappstream-glib/as-utils.c +++ b/libappstream-glib/as-utils.c @@ -1669,7 +1669,7 @@ as_utils_string_replace (GString *string, const gchar *search, const gchar *repl search_len - replace_len); memcpy (tmp, replace, replace_len); } else if (search_len < replace_len) { - g_string_insert_len (string, search_idx, search, + g_string_insert_len (string, search_idx, replace, replace_len - search_len); /* we have to treat this specially as it could have * been reallocated when the insertion happened */ -- cgit v1.2.1