@b4n commented on this pull request.


> @@ -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 or view it on GitHub:
https://github.com/geany/geany/pull/3785#pullrequestreview-2018297977
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/pull/3785/review/2018297...@github.com>

Reply via email to