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 eeb896d648
commit 0d6cff45c3

View File

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