1
0
mirror of https://github.com/irssi/irssi.git synced 2024-11-03 04:27:19 -05:00

Don't accept pos<0 or len<0 in gui_entry_set_color

This commit is contained in:
GinjaNinja32 2017-10-07 13:59:46 +01:00 committed by ailin-nemui
parent 13b93c8c05
commit 0f1b3873fe

View File

@ -1107,7 +1107,7 @@ void gui_entry_set_color(GUI_ENTRY_REC *entry, int pos, int len, int color)
g_return_if_fail(entry != NULL);
if (pos > entry->text_len)
if (pos < 0 || len < 0 || pos > entry->text_len)
return;
end = pos + len;