Commit 3643f849d7da5c12da589beb03c12303fe79b841
Committed by
Michal Marek
1 parent
84062dd3a6
Exists in
master
and in
39 other branches
kconfig: fix segfault when detecting recursive dependency
Following sample Kconfig generated a segfault: config FOO bool select PERF_EVENTS if HAVE_HW_BREAKPOINT config PERF_EVENTS bool config HAVE_HW_BREAKPOINT bool depends on PERF_EVENTS Fix by reverting back to a valid property if there was no property on the stack of symbols. The above pattern were seen in sh Kconfig. A fix for the Kconfig file has been sent to the sh folks. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
Showing 1 changed file with 2 additions and 0 deletions Side-by-side Diff
scripts/kconfig/symbol.c
... | ... | @@ -937,6 +937,8 @@ |
937 | 937 | sym = stack->sym; |
938 | 938 | next_sym = stack->next ? stack->next->sym : last_sym; |
939 | 939 | prop = stack->prop; |
940 | + if (prop == NULL) | |
941 | + prop = stack->sym->prop; | |
940 | 942 | |
941 | 943 | /* for choice values find the menu entry (used below) */ |
942 | 944 | if (sym_is_choice(sym) || sym_is_choice_value(sym)) { |