summaryrefslogtreecommitdiff
path: root/src/fe-text
diff options
context:
space:
mode:
authorGinjaNinja32 <ginjaninja32@gmail.com>2017-10-07 13:59:46 +0100
committerailin-nemui <ailin-nemui@users.noreply.github.com>2018-01-18 10:08:00 +0100
commit0f1b3873fe5b99cf8af9bc58d1a982dd5f0f66bd (patch)
treee1af851332f388ff905ab19c087d44b2266999ce /src/fe-text
parent13b93c8c05dafd4f45ca7153ae165d6afd0ba157 (diff)
downloadirssi-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.c2
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;