fix(lv_theme_mono): fix heap-buffer-overflow when memzero (#4583)
This commit is contained in:
@@ -198,7 +198,7 @@ lv_theme_t * lv_theme_mono_init(lv_display_t * disp, bool dark_bg, const lv_font
|
||||
*styles' data if LVGL is used in a binding (e.g. Micropython)
|
||||
*In a general case styles could be in simple `static lv_style_t my_style...` variables*/
|
||||
if(!lv_theme_mono_is_inited()) {
|
||||
theme_def = (my_theme_t *)lv_malloc(sizeof(my_theme_styles_t));
|
||||
theme_def = (my_theme_t *)lv_malloc(sizeof(my_theme_t));
|
||||
lv_memzero(theme_def, sizeof(my_theme_t));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user