Merge branch 'wip/carlosg/utf8-strreverse-invalid-writes' into 'master'

gutf8: Assert that written memory stays in bounds

See merge request GNOME/glib!1026
This commit is contained in:
Philip Withnall 2019-08-12 10:39:11 +00:00
commit 6d7143e91d

View File

@ -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++;
}