mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-09-21 22:34:05 +00:00
GtkEntry: Sanity check the end_pos value in _get_display_text()
This commit is contained in:
parent
32825a66ac
commit
ea043cab57
@ -2901,7 +2901,7 @@ _gtk_entry_get_display_text (GtkEntry *entry,
|
||||
text = gtk_entry_buffer_get_text (get_buffer (entry));
|
||||
length = gtk_entry_buffer_get_length (get_buffer (entry));
|
||||
|
||||
if (end_pos < 0)
|
||||
if (end_pos < 0 || end_pos > length)
|
||||
end_pos = length;
|
||||
if (start_pos > length)
|
||||
start_pos = length;
|
||||
|
Loading…
Reference in New Issue
Block a user