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>
This commit is contained in:
committed by
Sam Ravnborg
parent
48874077dd
commit
a67cb1319f
@@ -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;
|
||||
|
Reference in New Issue
Block a user