mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-02-16 14:34:53 +03:00
Ensure we don't read beyond the end of the array of available matches. Set any remaining saved pointers to NULL.
svn path=/trunk/netsurf/; revision=7641
This commit is contained in:
parent
cda586e6dc
commit
b03d52e6d9
@ -146,10 +146,16 @@ bool ro_gui_url_complete_keypress(struct gui_window *g, uint32_t key)
|
||||
lines = MAXIMUM_VISIBLE_LINES;
|
||||
if (lines > url_complete_matches_available)
|
||||
lines = url_complete_matches_available;
|
||||
if (url_complete_matches)
|
||||
for (i = 0; i < MAXIMUM_VISIBLE_LINES; i++)
|
||||
url_complete_redraw[i] =
|
||||
if (url_complete_matches) {
|
||||
for (i = 0; i < MAXIMUM_VISIBLE_LINES; i++) {
|
||||
if (i < lines) {
|
||||
url_complete_redraw[i] =
|
||||
url_complete_matches[i];
|
||||
} else {
|
||||
url_complete_redraw[i] = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* our selection gets wiped */
|
||||
error = xwimp_force_redraw(dialog_url_complete,
|
||||
|
Loading…
x
Reference in New Issue
Block a user