mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-20 07:38:54 +02:00
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:
@@ -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++;
|
||||
}
|
||||
|
Reference in New Issue
Block a user