From 92114367e4d605e1e415a99918a8d65ec22d7596 Mon Sep 17 00:00:00 2001 From: Benign X <1341398182@qq.com> Date: Thu, 21 Sep 2023 21:01:32 +0800 Subject: [PATCH] fix(lv_theme_mono): fix heap-buffer-overflow when memzero (#4583) --- src/themes/mono/lv_theme_mono.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/themes/mono/lv_theme_mono.c b/src/themes/mono/lv_theme_mono.c index 59c0c6a78..7528de51b 100644 --- a/src/themes/mono/lv_theme_mono.c +++ b/src/themes/mono/lv_theme_mono.c @@ -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)); }