Re: [PATCH] tty: serial: samsung: Fix potential buffer overflow in clkname
From: Krzysztof Kozlowski
Date: Tue Apr 01 2025 - 08:52:41 EST
On 01/04/2025 13:24, shao.mingyin@xxxxxxxxxx wrote:
> From: Peng Jiang <jiang.peng9@xxxxxxxxxx>
>
> Compiling the kernel with gcc12.3 W=1 produces a warning:
> /drivers/tty/serial/samsung_tty.c: In function
> 's3c24xx_serial_set_termios':
>
> /drivers/tty/serial/samsung_tty.c:1392:48:
> warning: '%d' directive writing between 1 and 3 bytes
> into a region of size 2 [-Wformat-overflow=]
> 1392 | sprintf(clkname, "clk_uart_baud%d", cnt);
Same comments as with other patches, not possible, IMO. Plus this patch
looks actually worse - commit msg is hardly readable.
Best regards,
Krzysztof