summaryrefslogtreecommitdiff
path: root/scripts/kconfig/mconf.c
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2007-09-19 23:23:09 +0400
committerSam Ravnborg <sam@neptun.(none)>2007-10-12 23:15:32 +0400
commita67cb1319f53fa68012a23d6ca45279c6bc627f8 (patch)
tree36a9ca55dd8180ca3583d4dbd22ed8c72fb1f04a /scripts/kconfig/mconf.c
parent48874077ddd6c0c444758059af2cf77c10204ece (diff)
downloadlinux-a67cb1319f53fa68012a23d6ca45279c6bc627f8.tar.xz
kconfig: fix segv fault in menuconfig
With specific configurations requesting help for certain menu lines caused menuconfig to crash. This was tracked down to a null pointer bug. Thanks to "Miles Lane" <miles.lane@gmail.com> for inital reporting and to Gabriel C <nix.or.die@googlemail.com> for the backtrace that helped me locating the bug. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts/kconfig/mconf.c')
-rw-r--r--scripts/kconfig/mconf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
index 2ee12a744641..1935818040e2 100644
--- a/scripts/kconfig/mconf.c
+++ b/scripts/kconfig/mconf.c
@@ -357,8 +357,9 @@ static void get_symbol_str(struct gstr *r, struct symbol *sym)
bool hit;
struct property *prop;
- str_printf(r, "Symbol: %s [=%s]\n", sym->name,
- sym_get_string_value(sym));
+ if (sym && sym->name)
+ str_printf(r, "Symbol: %s [=%s]\n", sym->name,
+ sym_get_string_value(sym));
for_all_prompts(sym, prop)
get_prompt_str(r, prop);
hit = false;