From 0f1b3873fe5b99cf8af9bc58d1a982dd5f0f66bd Mon Sep 17 00:00:00 2001 From: GinjaNinja32 Date: Sat, 7 Oct 2017 13:59:46 +0100 Subject: Don't accept pos<0 or len<0 in gui_entry_set_color --- src/fe-text/gui-entry.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.3