]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
Input: ims-pcu - fix printf string overflow
authorArnd Bergmann <arnd@arndb.de>
Thu, 28 Mar 2024 20:28:56 +0000 (13:28 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 16 Jun 2024 11:39:41 +0000 (13:39 +0200)
commit13e975b09b1e32f9b46e30d656f0e9c0f4cccae5
tree35bb7054e6cffc17b85ad4a683cda5b969a3d465
parente1e40928b78bd9c4be6c76509981dbea64279dd0
Input: ims-pcu - fix printf string overflow

[ Upstream commit bf32bceedd0453c70d9d022e2e29f98e446d7161 ]

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@arndb.de>
Link: https://lore.kernel.org/r/20240326223825.4084412-7-arnd@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/input/misc/ims-pcu.c