aboutsummaryrefslogtreecommitdiff
path: root/zlib/example.c
diff options
context:
space:
mode:
authorJan Vrany <jan.vrany@labware.com>2022-12-19 11:24:36 +0000
committerTom Tromey <tromey@adacore.com>2022-12-20 12:02:02 -0700
commita47dacc45bd8538e0a4c687e3d11468a51519a55 (patch)
tree013f47abb859fb81c423c328e5414fa9aa90f5a0 /zlib/example.c
parente110f63216814d18f1f7a1923f59c1bc7e4663fb (diff)
downloadgdb-a47dacc45bd8538e0a4c687e3d11468a51519a55.zip
gdb-a47dacc45bd8538e0a4c687e3d11468a51519a55.tar.gz
gdb-a47dacc45bd8538e0a4c687e3d11468a51519a55.tar.bz2
gdb: fix command lookup in execute_command ()
Commit b5661ff2 ("gdb: fix possible use-after-free when executing commands") used lookup_cmd_exact () to lookup command again after its execution to avoid possible use-after-free error. However this change broke test gdb.base/define.exp which defines a post-hook for subcommand ("target testsuite"). In this case, lookup_cmd_exact () returned NULL because there's no command 'testsuite' in top-level commands. This commit fixes this case by looking up the command again using the original command line via lookup_cmd (). Approved-By: Simon Marchi <simon.marchi@efficios.com> (cherry picked from commit 37e5833da583310268dc1b04fc6839e81b987897)
Diffstat (limited to 'zlib/example.c')
0 files changed, 0 insertions, 0 deletions