summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2022-04-24 12:43:34 +0100
committerSolomon Peachy <pizza@shaftnet.org>2024-04-21 20:38:25 -0400
commit6cbcde13b9eb10b50724f956ba5696fc82ed7cf4 (patch)
treebf1745be9527256c58fcf2baeda8c2c7aaec3f37
parent591a83a0892b6acc2b81ccdbcfb48b5391090e7c (diff)
downloadrockbox-6cbcde13b9.tar.gz
rockbox-6cbcde13b9.zip
skin engine: Fix bug with touch region labeling
Auto-created regions associated with a progress bar did not have a label which could result in an out of bounds read when looking up touch regions by label. Fix by initializing the label to NULL. Change-Id: Ic12d697a6a5a45dad977f307471b91db9e607bd5
-rw-r--r--apps/gui/skin_engine/skin_parser.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c
index ac68b0dcba..be25bd0125 100644
--- a/apps/gui/skin_engine/skin_parser.c
+++ b/apps/gui/skin_engine/skin_parser.c
@@ -1287,6 +1287,7 @@ static int parse_progressbar_tag(struct skin_element* element,
region->last_press = -1;
region->armed = false;
region->bar = PTRTOSKINOFFSET(skin_buffer, pb);
+ region->label = PTRTOSKINOFFSET(skin_buffer, NULL);
item = new_skin_token_list_item(NULL, region);
if (!item)