]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
kconfig: lxdialog: replace strcpy() with strncpy() in inputbox.c
authorSuchit Karunakaran <suchitkarunakaran@gmail.com>
Sun, 27 Jul 2025 16:44:33 +0000 (22:14 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Aug 2025 16:30:47 +0000 (18:30 +0200)
commitd850808db603ed9778b128f6f4c2f9f2a7c6d029
treef08cd899f8d0a2035091d60be165c4766a562cae
parent6d85a25c1bfef39062dd01840dbafdf19f079c12
kconfig: lxdialog: replace strcpy() with strncpy() in inputbox.c

[ Upstream commit 5ac726653a1029a2eccba93bbe59e01fc9725828 ]

strcpy() performs no bounds checking and can lead to buffer overflows if
the input string exceeds the destination buffer size. This patch replaces
it with strncpy(), and null terminates the input string.

Signed-off-by: Suchit Karunakaran <suchitkarunakaran@gmail.com>
Reviewed-by: Nicolas Schier <nicolas.schier@linux.dev>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
scripts/kconfig/lxdialog/inputbox.c