forked from AuroraMiddleware/gtk
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;
|
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)
|
if (found_candidate)
|
||||||
n_matches = populate_completion (completion, p, 0);
|
n_matches = populate_completion (completion, p, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user