fix(lv_theme_mono): fix heap-buffer-overflow when memzero (#4583)

This commit is contained in:
Benign X
2023-09-21 21:01:32 +08:00
committed by GitHub
parent f67dd2af55
commit 92114367e4

View File

@@ -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));
}