summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc/python_version.py
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2026-07-16 00:23:47 -0700
committerNamhyung Kim <namhyung@kernel.org>2026-07-17 22:34:06 -0700
commit5bc1647216b68c17d03665739ea18bba8447f3ce (patch)
tree61d1401949521cc2036c2d4a456476a285bd5088 /tools/lib/python/kdoc/python_version.py
parent1243a5e741a4f93312a2da16929bb66edb5d5b25 (diff)
perf ui hists: Fix NULL pointer array gap in add_script_opt()
In add_script_opt(), the function unconditionally increments the optstr and act pointers for a second optional 'time' popup action before attempting to invoke add_script_opt_2(). If the first add_script_opt_2() call failed (for example, due to an asprintf allocation failure), this leaves a NULL pointer gap in the options array at the prior index. When ui__popup_menu() is later displayed, it dereferences this gap and crashes. Fix it by avoiding unconditional pointer increments. Only advance the optstr and act pointers if the first script addition actually succeeded, and safely attach the time parameter to the correct assigned action. Assisted-by: Antigravity:gemini-3.5-flash Signed-off-by: Ian Rogers <irogers@google.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions