Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

kconfig: qconf: fix buffer overflow in debug links

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>

+1 -1
+1 -1
scripts/kconfig/qconf.cc
··· 1166 1166 { 1167 1167 QByteArray str = url.toEncoded(); 1168 1168 const std::size_t count = str.size(); 1169 - char *data = new char[count + 1]; 1169 + char *data = new char[count + 2]; // '$' + '\0' 1170 1170 struct symbol **result; 1171 1171 struct menu *m = NULL; 1172 1172