Re: [PATCH 6/9] Input: IMS: fix printf string overflow

From: Dmitry Torokhov
Date: Thu Mar 28 2024 - 16:29:37 EST


On Tue, Mar 26, 2024 at 11:38:05PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> clang warns about a string overflow in this driver
>
> drivers/input/misc/ims-pcu.c:1802:2: error: 'snprintf' will always be truncated; specified size is 10, but format string expands to at least 12 [-Werror,-Wformat-truncation]
> drivers/input/misc/ims-pcu.c:1814:2: error: 'snprintf' will always be truncated; specified size is 10, but format string expands to at least 12 [-Werror,-Wformat-truncation]
>
> Make the buffer a little longer to ensure it always fits.
>
> Fixes: 628329d52474 ("Input: add IMS Passenger Control Unit driver")
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>

Applied, thank you.

--
Dmitry