diff options
author | GinjaNinja32 <ginjaninja32@gmail.com> | 2017-10-07 13:59:46 +0100 |
---|---|---|
committer | ailin-nemui <ailin-nemui@users.noreply.github.com> | 2018-01-18 10:08:00 +0100 |
commit | 0f1b3873fe5b99cf8af9bc58d1a982dd5f0f66bd (patch) | |
tree | e1af851332f388ff905ab19c087d44b2266999ce /src/fe-text | |
parent | 13b93c8c05dafd4f45ca7153ae165d6afd0ba157 (diff) | |
download | irssi-0f1b3873fe5b99cf8af9bc58d1a982dd5f0f66bd.zip |
Don't accept pos<0 or len<0 in gui_entry_set_color
Diffstat (limited to 'src/fe-text')
-rw-r--r-- | src/fe-text/gui-entry.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fe-text/gui-entry.c b/src/fe-text/gui-entry.c index 27eaa540..bef76a96 100644 --- a/src/fe-text/gui-entry.c +++ b/src/fe-text/gui-entry.c @@ -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; |