aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-strlcpy-src.c
diff options
context:
space:
mode:
authorJames Clark <[email protected]>2023-06-30 16:38:39 +0100
committerNamhyung Kim <[email protected]>2023-07-01 10:49:13 -0700
commit78a175c4623f66722709494295a0f6754b46f858 (patch)
treea867be0436cab85e9c20f951690dda2013f91b73 /lib/test_fortify/write_overflow-strlcpy-src.c
parent2aefb4cc904f17aad03acc3e05f44cef7801c497 (diff)
perf symbol: Fix uninitialized return value in symbols__find_by_name()
found_idx and s aren't initialized, so if no symbol is found then the assert at the end will index off the end of the array causing a segfault. The function also doesn't return NULL when the symbol isn't found even if the assert passes. Fix it by initializing the values and only setting them when something is found. Fixes the following test failure: $ perf test 1 1: vmlinux symtab matches kallsyms : FAILED! Fixes: 259dce914e93 ("perf symbol: Remove symbol_name_rb_node") Signed-off-by: James Clark <[email protected]> Acked-by: Ian Rogers <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Ingo Molnar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Namhyung Kim <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strlcpy-src.c')
0 files changed, 0 insertions, 0 deletions