From 514481ef7f9c71ad816b31d979c6ab39ce9380dd Mon Sep 17 00:00:00 2001 From: Jean-François Milants Date: Sun, 25 Jul 2021 19:55:21 +0200 Subject: Tile event handler : read the event data only if the event is a "value changed event". LVGL sends many other event and some of them do not set the event data (global static variable) to a valid address, which may cause an invalid read. I noticed that when porting this class on RISC-V platform (BL602). --- src/displayapp/screens/Tile.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/displayapp/screens/Tile.h') diff --git a/src/displayapp/screens/Tile.h b/src/displayapp/screens/Tile.h index 4ebd81cd..765a8def 100644 --- a/src/displayapp/screens/Tile.h +++ b/src/displayapp/screens/Tile.h @@ -32,7 +32,7 @@ namespace Pinetime { bool Refresh() override; void UpdateScreen(); - void OnObjectEvent(lv_obj_t* obj, lv_event_t event, uint32_t buttonId); + void OnValueChangedEvent(lv_obj_t* obj, uint32_t buttonId); private: Pinetime::Controllers::Battery& batteryController; -- cgit v1.2.3