mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-22 23:37:43 +08:00
fix(observer): protect against possible negative arg value
This commit is contained in:
committed by
Gabor Kiss-Vamosi
parent
bae25ad288
commit
43b32341b0
@@ -320,6 +320,7 @@ lv_subject_t * lv_subject_get_group_element(lv_subject_t * subject, int32_t inde
|
||||
}
|
||||
|
||||
if(index >= (int32_t)subject->size) return NULL;
|
||||
if(index < 0) return NULL;
|
||||
|
||||
return ((lv_subject_t **)(subject->value.pointer))[index];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user