linux/tools/perf/util/ui
Jiri Olsa 8493fe1daf perf hists browser: Fix NULL deref in hists browsing code
If there's an event with no samples in data file, the perf report
command can segfault after entering the event details menu.

Following steps reproduce the issue:

 # ./perf record -e syscalls:sys_enter_kexec_load,syscalls:sys_enter_mmap ls
 # ./perf report
 # enter '0 syscalls:sys_enter_kexec_load' menu
 # pres ENTER twice

Above steps are valid assuming ls wont run kexec.. ;)

The check for sellection to be NULL is missing. The fix makes sure it's
being check. Above steps now endup with menu being displayed allowing
'Exit' as the only option.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1333570898-10505-2-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-04-05 18:58:45 -03:00
..
browsers perf hists browser: Fix NULL deref in hists browsing code 2012-04-05 18:58:45 -03:00
browser.c perf hists browser: Warn about lost events 2011-11-02 12:27:23 -02:00
browser.h perf ui browser: Introduce ui_browser__input_window 2012-03-16 16:32:36 -03:00
helpline.c perf tools: Use scnprintf where applicable 2012-03-14 12:36:19 -03:00
helpline.h perf ui browser: Handle K_RESIZE in dialog windows 2011-10-26 13:15:07 -02:00
keysyms.h perf ui browser: Introduce ui_browser__input_window 2012-03-16 16:32:36 -03:00
libslang.h
progress.c perf ui progress: Fix divide by zero 2011-11-28 10:36:57 -02:00
progress.h perf ui progress: Reimplement using slang 2011-10-26 13:04:42 -02:00
setup.c perf ui: Reimplement the popup windows using libslang 2011-10-26 13:06:36 -02:00
ui.h perf ui: Improve handling sigwinch a bit 2011-10-26 13:05:23 -02:00
util.c perf ui browser: Clean lines inside of the input window 2012-03-19 12:07:30 -03:00
util.h perf ui browser: Handle K_RESIZE in dialog windows 2011-10-26 13:15:07 -02:00