]> git.hungrycats.org Git - linux/commit
kconfig: qconf: fix buffer overflow in debug links
authorMasahiro Yamada <masahiroy@kernel.org>
Tue, 1 Oct 2024 09:02:22 +0000 (18:02 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Oct 2024 10:01:09 +0000 (12:01 +0200)
commit830a573b87cfe6d3addacbf74c0aefc954823d97
tree7c4f8ff38672989acd4a20a260f153b2c9dcf88d
parentc0bdc6c6a97cdda5627ab9f7e0596720e70d30d5
kconfig: qconf: fix buffer overflow in debug links

[ Upstream commit 984ed20ece1c6c20789ece040cbff3eb1a388fa9 ]

If you enable "Option -> Show Debug Info" and click a link, the program
terminates with the following error:

    *** buffer overflow detected ***: terminated

The buffer overflow is caused by the following line:

    strcat(data, "$");

The buffer needs one more byte to accommodate the additional character.

Fixes: c4f7398bee9c ("kconfig: qconf: make debug links work again")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
scripts/kconfig/qconf.cc