amlogic: hdmitx: Fix stringop-overread warning 72/292572/1
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Wed, 3 May 2023 10:49:08 +0000 (19:49 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Mon, 8 May 2023 09:37:35 +0000 (18:37 +0900)
There is copying size 3 from one space string and it causes
stringop-overread warning. Fix to copy from three spaces string.

Change-Id: Iee4f9de77ab8f990d7ecc06ea18ebba1e56839ea
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c

index 12e7e40..bed116a 100644 (file)
@@ -595,7 +595,7 @@ static int set_disp_mode_auto(void)
 
 
        if (strstr(hdmitx_device.fmt_attr,"now") != NULL) {
-               memcpy(strstr(hdmitx_device.fmt_attr,"now"), " ", 3);
+               memcpy(strstr(hdmitx_device.fmt_attr,"now"), "   ", 3);
        }
        hdev->cur_VIC = HDMI_Unknown;
 /* if vic is HDMI_Unknown, hdmitx_set_display will disable HDMI */