mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 02:40:11 +00:00
emojicompletion: Avoid a memory overrun
Don't read beyond the beginning of the string. Fixes: #3245
This commit is contained in:
parent
0bd5a96d71
commit
4e04c39609
@ -115,7 +115,8 @@ next:
|
||||
break;
|
||||
}
|
||||
}
|
||||
while (g_unichar_isalnum (g_utf8_get_char (p)) || *p == '_' || *p == ' ');
|
||||
while (p > text &&
|
||||
(g_unichar_isalnum (g_utf8_get_char (p)) || *p == '_' || *p == ' '));
|
||||
|
||||
if (found_candidate)
|
||||
n_matches = populate_completion (completion, p, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user