@b4n commented on this pull request.


In src/tagmanager/tm_ctags.c:

> @@ -241,6 +241,33 @@ void tm_ctags_clear_ignore_symbols(void)
 }
 
 
+static gboolean replace_str(gchar **where, const gchar *what, gsize what_len,
+	const gchar *replacement, gsize replacement_len)
+{
+	if (where && *where)
+	{
+		gchar *pos = strstr(*where, what);
+
+		if (pos)
+		{
+			gsize where_len = strlen(*where);
+			gchar *str = g_malloc(where_len + (replacement_len - what_len) + 1);

hum, the issue might be the parentheses here: as those are both unsigned, wouldn't it wrap around if what_len < replacement_len? if that's it, just dropping the parentheses should work (as what_len cannot be longer than where_len, and replacement_len cannot be negative)


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <geany/geany/pull/3785/review/2018297977@github.com>