video: fbdev: exynos: dpu9110: panel: s6e36w3x01: remove buffer overflow 17/220817/2
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Mon, 23 Dec 2019 08:29:02 +0000 (17:29 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Fri, 27 Dec 2019 01:57:21 +0000 (10:57 +0900)
The memcpy to buffer has out of bounds for array. Remove the
buffer overflow for by adding additional array length.

Change-Id: I0aa5974fd39a6a7f705740ce1dcbf6ce15c2e935
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
drivers/video/fbdev/exynos/dpu_9110/panels/s6e36w3x01_l_mipi_lcd.c

index d458cee3a788df2866c57759871e74568664cd7b..8b1824cd5609012880fbfb36d078b47b7c4f2a62 100755 (executable)
@@ -1705,7 +1705,7 @@ error:
 static int s6e36w3x01_read_init_info(struct dsim_device *dsim, unsigned char *mtp, unsigned char *hbm)
 {
        struct panel_private *panel = &dsim->priv;
-       unsigned char buf[S6E36W3_MTP_DATE_SIZE] = { 0, };
+       unsigned char buf[S6E36W3_MTP_DATE_SIZE + 1] = { 0, };
        unsigned char bufForCoordi[S6E36W3_COORDINATE_LEN] = { 0, };
        unsigned char bufForProductDate[S6E36W3_PRODUCT_DATE_LEN] = {0, };
        int i = 0;