diff --git a/glib/gutf8.c b/glib/gutf8.c index a19f72044..fe0f8ab14 100644 --- a/glib/gutf8.c +++ b/glib/gutf8.c @@ -1773,6 +1773,7 @@ g_utf8_strreverse (const gchar *str, { gchar *m, skip = g_utf8_skip[*(guchar*) p]; r -= skip; + g_assert (r >= result); for (m = r; skip; skip--) *m++ = *p++; }