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:
parent
13b93c8c05
commit
0f1b3873fe
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user