I had to make one more change, replace guint with gsize in what_len and replacement_len:

static gboolean replace_str(gchar **where, const gchar *what, gsize what_len,
	const gchar *replacement, gsize replacement_len)

because otherwise

gchar *str = g_malloc(where_len + (replacement_len - what_len) + 1);

may underflow.

Interestingly, only meson unit tests failed and not the autotools ones - not sure why.


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/c2073445322@github.com>