diff options
author | Aidan MacDonald <amachronic@protonmail.com> | 2021-06-22 21:39:45 +0100 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2021-06-22 21:42:02 +0100 |
commit | 6da490099b9ef853488ea308978fed149212f33b (patch) | |
tree | 39455dd844a70e6501e9a61c53d2f107b20d606f /apps/gui/bitmap | |
parent | 76e07a7fd201391b67988681ef3cf6a53d4f22d2 (diff) |
Touchscreen: absolute point mode scrolling bugfix
Due to this inadequate bounds check, it was possible under certain
conditions to cause a crash by touching & scrolling in the empty
space "after" the last item of a list.
Change-Id: Ic6c30214d887e1c7ccb212de272248ca24f60856
Diffstat (limited to 'apps/gui/bitmap')
-rw-r--r-- | apps/gui/bitmap/list.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/gui/bitmap/list.c b/apps/gui/bitmap/list.c index 6f6a8c1f7f..a82595fb37 100644 --- a/apps/gui/bitmap/list.c +++ b/apps/gui/bitmap/list.c @@ -734,7 +734,7 @@ unsigned gui_synclist_do_touchscreen(struct gui_synclist * list) if (list_display_title(list, screen)) line -= 1; /* adjust for the list title */ } - if (line >= list->nb_items) + if (list_start_item+line >= list->nb_items) return ACTION_NONE; list->selected_item = list_start_item+line; |