Skip to content

Commit 90f01af

Browse files
captain5050acmel
authored andcommitted
perf ui browser: Avoid SEGV on title
If the title is NULL then it can lead to a SEGV. Fixes: 769e6a1 ("perf ui browser: Don't save pointer to stack memory") Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@arm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Leo Yan <leo.yan@linux.dev> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20240508035301.1554434-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 187c219 commit 90f01af

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tools/perf/ui/browser.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ void ui_browser__refresh_dimensions(struct ui_browser *browser)
203203
void ui_browser__handle_resize(struct ui_browser *browser)
204204
{
205205
ui__refresh_dimensions(false);
206-
ui_browser__show(browser, browser->title, ui_helpline__current);
206+
ui_browser__show(browser, browser->title ?: "", ui_helpline__current);
207207
ui_browser__refresh(browser);
208208
}
209209

0 commit comments

Comments
 (0)