linux/scripts/kconfig
Arnaud Lacombe f98ee76955 kconfig/nconf: prevent segfault on empty menu
nconf does not check the validity of the current menu when help is
requested (with either <F2>, '?' or 'h'). This leads to a NULL pointer
dereference when an empty menu is encountered.

The following reduced testcase exposes the problem:

config DEP
        bool

menu "FOO"

config BAR
        bool "BAR"
        depends on DEP

endmenu

Issue will happen when entering menu "FOO" and requesting help.

nconf is the only front-end which do not filter the validity of the
current menu. Such filter can not really happen beforehand as other key
which does not deals with the current menu might be entered by the user,
so just bails out earlier if we encounter an invalid menu.

Cc: Nir Tzachar <nir.tzachar@gmail.com>
Cc: Andrej Gelenberg <andrej.gelenberg@udo.edu>
Reported-by: Andrej Gelenberg <andrej.gelenberg@udo.edu>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2011-07-13 13:48:11 +02:00
..
lxdialog kconfig: fix menuconfig on debian lenny 2010-09-20 14:09:31 +02:00
.gitignore scripts: add nconf into gitignore file 2010-06-03 10:12:40 +02:00
check.sh kbuild: check if we can link gettext not just compile 2007-10-12 21:13:50 +02:00
conf.c kconfig/conf: mark xfgets() private 2011-07-02 01:04:40 -04:00
confdata.c kconfig: introduce specialized printer 2011-07-01 16:23:27 +02:00
expr.c kconfig: use calloc() for expr allocation 2011-07-02 01:04:37 -04:00
expr.h kconfig: nuke reference to SWIG 2011-06-06 15:32:18 -04:00
gconf.c kconfig/gconf: kill deadcode 2011-06-06 15:32:22 -04:00
gconf.glade scripts/kconfig/gconf.glade Update broken web addresses. 2010-09-17 16:54:42 +02:00
images.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
kxgettext.c kconfig: nuke LKC_DIRECT_LINK cruft 2011-06-06 15:32:20 -04:00
lex.zconf.c_shipped kconfig: nuke LKC_DIRECT_LINK cruft 2011-06-06 15:32:20 -04:00
lkc_proto.h kconfig: introduce specialized printer 2011-07-01 16:23:27 +02:00
lkc.h Merge branch 'kconfig-trivial' of git://github.com/lacombar/linux-2.6 into kbuild/kconfig 2011-07-04 11:24:10 +02:00
Makefile kconfig/gconf: silent missing prototype warnings 2011-06-06 15:32:23 -04:00
mconf.c kconfig: nuke LKC_DIRECT_LINK cruft 2011-06-06 15:32:20 -04:00
menu.c kconfig: do not overwrite symbol direct dependency in assignment 2011-06-24 17:21:27 +02:00
nconf.c kconfig/nconf: prevent segfault on empty menu 2011-07-13 13:48:11 +02:00
nconf.gui.c kbuild: fix typo 2010-08-17 11:00:43 +02:00
nconf.h nconfig: add search support 2010-08-16 22:04:55 +02:00
POTFILES.in kconfig: gettext support for lxdialog 2008-01-28 23:14:39 +01:00
qconf.cc kconfig: nuke LKC_DIRECT_LINK cruft 2011-06-06 15:32:20 -04:00
qconf.h kconfig qconf: port to QT4 2010-09-01 16:14:29 +02:00
streamline_config.pl trivial: Fix Steven's Copyright typos 2011-02-08 17:14:31 -05:00
symbol.c kconfig: introduce specialized printer 2011-07-01 16:23:27 +02:00
util.c kconfig: add missing <stdlib.h> inclusion 2011-06-06 15:32:16 -04:00
zconf.gperf kconfig: add an option to determine a menu's visibility 2010-11-22 11:27:17 -02:00
zconf.hash.c_shipped kconfig: regen parser 2010-11-22 11:27:32 -02:00
zconf.l kconfig: nuke LKC_DIRECT_LINK cruft 2011-06-06 15:32:20 -04:00
zconf.tab.c_shipped kconfig: nuke LKC_DIRECT_LINK cruft 2011-06-06 15:32:20 -04:00
zconf.y kconfig: nuke LKC_DIRECT_LINK cruft 2011-06-06 15:32:20 -04:00