WSL2-Linux-Kernel/scripts/kconfig
Stephen Boyd 58f915a311 nconfig: Fix segfault when help contains special characters
nconfig segfaults when help text contains the character '%'. For a quick
example, navigate to the kernel compression options and get the help for
bzip2. Doing so triggers a call to mvwprintw() with a string containing
'%' and no extra arguments to fill in the specifier's value. Fix this
case by printing the literal string retrieved from the kconfig.

 #0  0x00002b52b6b11d83 in vfprintf () from /lib/libc.so.6
 #1  0x00002b52b6bad010 in __vsnprintf_chk () from /lib/libc.so.6
 #2  0x00002b52b623991b in _nc_printf_string () from
 /lib/libncursesw.so.5
 #3  0x00002b52b6234cff in vwprintw () from /lib/libncursesw.so.5
 #4  0x00002b52b6234db9 in mvwprintw () from /lib/libncursesw.so.5
 #5  0x00000000004151d8 in fill_window (win=0x21b64c0,
     text=0x21b62b0 "CONFIG_KERNEL_BZIP2:\n\nIts compression ratio and
     speed is intermediate.\nDecompression speed is slowest among the
     three.  The kernel\nsize is about 10% smaller with bzip2, in
     comparison to gzip.\nBzip2 us"...)
     at scripts/kconfig/nconf.gui.c:229
 #6  0x0000000000416335 in show_scroll_win (main_window=0x21a5630,
         title=0x157fa30 "Bzip2",
 	    text=0x21b62b0 "CONFIG_KERNEL_BZIP2:\n\nIts compression
 	    ratio and speed is intermediate.\nDecompression speed is
 	    slowest among the three.  The kernel\nsize is about 10%
 	    smaller with bzip2, in comparison to gzip.\nBzip2 us"...)
     at scripts/kconfig/nconf.gui.c:535
 #7  0x00000000004055b2 in show_help (menu=0x157f9d0)
         at scripts/kconfig/nconf.c:1257
 #8  0x0000000000405897 in conf_choice (menu=0x157f130)
 	    at scripts/kconfig/nconf.c:1321
 #9  0x0000000000405326 in conf (menu=0x157d130) at
 	    scripts/kconfig/nconf.c:1208
 #10 0x00000000004052e8 in conf (menu=0xb434a0) at
 	    scripts/kconfig/nconf.c:1203
 #11 0x0000000000406092 in main (ac=2, av=0x7fff96a93c38)

Cc: Michal Marek <mmarek@suse.cz>
Cc: Nir Tzachar <nir.tzachar@gmail.com>
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-07-23 11:23:42 +02:00
..
lxdialog menuconfig: add support to show hidden options which have prompts 2010-04-14 15:34:19 +02:00
.gitignore gitignore: ignore Kconfig i18n files 2009-06-09 22:37:47 +02:00
Makefile Merge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6 2010-06-04 15:37:21 -07:00
POTFILES.in kconfig: gettext support for lxdialog 2008-01-28 23:14:39 +01:00
check.sh kbuild: check if we can link gettext not just compile 2007-10-12 21:13:50 +02:00
conf.c kbuild: add static to prototypes 2009-09-20 12:27:44 +02:00
confdata.c kbuild: generate modules.builtin 2009-12-12 13:08:16 +01:00
expr.c menuconfig: wrap long help lines 2010-02-02 14:33:55 +01:00
expr.h Improve kconfig symbol hashing 2010-02-02 14:33:55 +01:00
gconf.c gconfig: add support to show hidden options that have prompts 2010-04-14 15:34:19 +02:00
gconf.glade gconfig: add support to show hidden options that have prompts 2010-04-14 15:34:19 +02:00
images.c
kconfig_load.c
kxgettext.c kbuild: add static to prototypes 2009-09-20 12:27:44 +02:00
lex.zconf.c_shipped kconfig: Mark various internal functions static 2009-11-15 15:00:16 -08:00
lkc.h kconfig: new configuration interface (nconfig) 2010-02-02 14:33:55 +01:00
lkc_proto.h menuconfig: add support to show hidden options which have prompts 2010-04-14 15:34:19 +02:00
mconf.c menuconfig: add support to show hidden options which have prompts 2010-04-14 15:34:19 +02:00
menu.c menuconfig: add support to show hidden options which have prompts 2010-04-14 15:34:19 +02:00
nconf.c nconfig: minor fix 2010-02-02 14:33:55 +01:00
nconf.gui.c nconfig: Fix segfault when help contains special characters 2010-07-23 11:23:42 +02:00
nconf.h kconfig: new configuration interface (nconfig) 2010-02-02 14:33:55 +01:00
qconf.cc kconfig: make use of menu_get_ext_help in qconfig 2009-09-20 12:27:41 +02:00
qconf.h kconfig/xconfig: sync main view with search dialog current menu 2007-05-02 20:58:08 +02:00
streamline_config.pl kconfig: Hide error output in find command in streamline_config.pl 2010-05-28 10:34:41 -04:00
symbol.c kconfig: recalc symbol value before showing search results 2010-03-23 12:29:07 +01:00
util.c Merge branch 'for-35' of git://repo.or.cz/linux-kbuild 2010-06-01 08:55:52 -07:00
zconf.gperf kconfig: Mark various internal functions static 2009-11-15 15:00:16 -08:00
zconf.hash.c_shipped kconfig: Mark various internal functions static 2009-11-15 15:00:16 -08:00
zconf.l kconfig: Mark various internal functions static 2009-11-15 15:00:16 -08:00
zconf.tab.c_shipped kconfig: fix zconfdump() 2010-04-14 15:34:18 +02:00
zconf.y kconfig: fix zconfdump() 2010-04-14 15:34:18 +02:00