Skip to content

Commit dfbd6b8

Browse files
faxe1008fabiobaltieri
authored andcommitted
modules: lvgl: Fix pixel count variable overflow
For larger resolution displays uint16_t might overflow. Make the type bigger to prevent this. Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
1 parent 2150a55 commit dfbd6b8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

modules/lvgl/lvgl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ static int lvgl_allocate_rendering_buffers(lv_display_t *display)
158158
{
159159
void *buf0 = NULL;
160160
void *buf1 = NULL;
161-
uint16_t buf_nbr_pixels;
161+
uint32_t buf_nbr_pixels;
162162
uint32_t buf_size;
163163
struct lvgl_disp_data *data = (struct lvgl_disp_data *)lv_display_get_user_data(display);
164164
uint16_t hor_res = lv_display_get_horizontal_resolution(display);

0 commit comments

Comments
 (0)