Browse Source

drivers: display: ssd1322: fix out-of-bound access

Fix memory corruption issue where buffer pointer was not being advanced
properly due to missing dereference.

Fixes Coverity issue CID 434607
Fixes zephyrproject-rtos/zephyr#81957

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
pull/92152/head
Benjamin Cabé 2 weeks ago committed by Dan Kalowsky
parent
commit
350a5ef394
  1. 2
      drivers/display/ssd1322.c

2
drivers/display/ssd1322.c

@ -118,7 +118,7 @@ static int ssd1322_conv_mono01_grayscale(const uint8_t **buf_in, uint32_t *pixel @@ -118,7 +118,7 @@ static int ssd1322_conv_mono01_grayscale(const uint8_t **buf_in, uint32_t *pixel
}
}
buf_in += pixels_in_chunk / 8;
*buf_in += pixels_in_chunk / 8;
*pixel_count -= pixels_in_chunk;
return pixels_in_chunk * segments_per_pixel / SEGMENTS_PER_BYTE;
}

Loading…
Cancel
Save