1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

lv_draw_img: fix buffer oveflow with alpha byte

This commit is contained in:
Gabor Kiss-Vamosi 2018-06-01 12:39:34 +02:00
parent 20c8e12e09
commit 8441f8bff7

View File

@ -402,9 +402,9 @@ void lv_draw_img(const lv_area_t * coords, const lv_area_t * mask,
lv_color_t buf[lv_area_get_width(&mask_com)];
#else
# if LV_HOR_RES > LV_VER_RES
lv_color_t buf[LV_HOR_RES];
uint8_t buf[LV_HOR_RES * px_size];
# else
lv_color_t buf[LV_VER_RES];
uint8_t buf[LV_VER_RES * px_size];
# endif
#endif
for(row = mask_com.y1; row <= mask_com.y2; row ++) {