diff options
author | Steven Rostedt (VMware) <[email protected]> | 2021-10-27 10:57:53 -0400 |
---|---|---|
committer | Steven Rostedt (VMware) <[email protected]> | 2021-10-27 11:22:09 -0400 |
commit | 39d9c1c103d3061ac94219ac12c04753860b337e (patch) | |
tree | 2de687f25668ad608a8ad61ba484620ebe2b56db /tools/perf/scripts/python/event_analyzing_sample.py | |
parent | d33cc657372366a8959f099c619a208b4c5dc664 (diff) |
bootconfig: Initialize ret in xbc_parse_tree()
The do while loop continues while ret is zero, but ret is never
initialized. The check for ret in the loop at the while should always be
initialized, but if an empty string were to be passed in, q would be NULL
and p would be '\0', and it would break out of the loop without ever
setting ret.
Set ret to zero, and then xbc_verify_tree() would be called and catch that
it is an empty tree and report the proper error.
Link: https://lkml.kernel.org/r/[email protected]
Fixes: bdac5c2b243f ("bootconfig: Allocate xbc_data inside xbc_init()")
Reported-by: kernel test robot <[email protected]>
Reported-by: Andrew Morton <[email protected]>
Acked-by: Masami Hiramatsu <[email protected]>
Signed-off-by: Steven Rostedt (VMware) <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions