android_kernel_xiaomi_sm8350/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.

   0x00002b52b6b11d83 in vfprintf () from /lib/libc.so.6
   0x00002b52b6bad010 in __vsnprintf_chk () from /lib/libc.so.6
   0x00002b52b623991b in _nc_printf_string () from
 /lib/libncursesw.so.5
   0x00002b52b6234cff in vwprintw () from /lib/libncursesw.so.5
   0x00002b52b6234db9 in mvwprintw () from /lib/libncursesw.so.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
   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
   0x00000000004055b2 in show_help (menu=0x157f9d0)
         at scripts/kconfig/nconf.c:1257
   0x0000000000405897 in conf_choice (menu=0x157f130)
 	    at scripts/kconfig/nconf.c:1321
   0x0000000000405326 in conf (menu=0x157d130) at
 	    scripts/kconfig/nconf.c:1208
  0x00000000004052e8 in conf (menu=0xb434a0) at
 	    scripts/kconfig/nconf.c:1203
  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
check.sh
conf.c
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
lex.zconf.c_shipped
lkc_proto.h menuconfig: add support to show hidden options which have prompts 2010-04-14 15:34:19 +02:00
lkc.h kconfig: new configuration interface (nconfig) 2010-02-02 14:33:55 +01: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
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
POTFILES.in
qconf.cc
qconf.h
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
zconf.hash.c_shipped
zconf.l
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