From ceae0c539e555fca6b70410e7eb2d6a24cdaf6f0 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Fri, 1 Jun 2018 12:41:58 +0200 Subject: [PATCH] lv_draw_img: further fix on buffer oveflow --- lv_draw/lv_draw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lv_draw/lv_draw.c b/lv_draw/lv_draw.c index b7403a8c7..eb236836e 100644 --- a/lv_draw/lv_draw.c +++ b/lv_draw/lv_draw.c @@ -399,7 +399,7 @@ void lv_draw_img(const lv_area_t * coords, const lv_area_t * mask, lv_coord_t row; uint32_t act_pos; #if LV_COMPILER_VLA_SUPPORTED - lv_color_t buf[lv_area_get_width(&mask_com)]; + uint8_t buf[lv_area_get_width(&mask_com) * px_size]; #else # if LV_HOR_RES > LV_VER_RES uint8_t buf[LV_HOR_RES * px_size];