accelgroup: Fix a buffer overrun

gtk_accelerator_parse_with_keycode can
overrun its buffer for certain inputs.

Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/2325
This commit is contained in:
Matthias Clasen 2019-12-23 23:17:29 -05:00
parent 245546de61
commit 2a7b5d8229

View File

@ -1295,9 +1295,9 @@ gtk_accelerator_parse_with_keycode (const gchar *accelerator,
last_ch = *accelerator;
while (last_ch && last_ch != '>')
{
last_ch = *accelerator;
accelerator += 1;
len -= 1;
last_ch = *accelerator;
}
}
}