aboutsummaryrefslogtreecommitdiff
path: root/scripts/qapi/source.py
diff options
context:
space:
mode:
authorYodel Eldar <yodel.eldar@gmail.com>2025-07-10 11:45:26 +0100
committerAlex Bennée <alex.bennee@linaro.org>2025-07-14 11:42:49 +0100
commit81143b7f9d9f6645dcd6e9ea3fca0942ab25c337 (patch)
tree47e14ce65b23f1a3985e779720af47aa2d9a6854 /scripts/qapi/source.py
parent17c2c399bdf75c314bfce97fb9fb21badc9e4465 (diff)
downloadqemu-81143b7f9d9f6645dcd6e9ea3fca0942ab25c337.zip
qemu-81143b7f9d9f6645dcd6e9ea3fca0942ab25c337.tar.gz
qemu-81143b7f9d9f6645dcd6e9ea3fca0942ab25c337.tar.bz2
contrib/plugins/execlog: Add tab to the separator search of insn_disas
Currently, execlog searches for a space separator between the instruction mnemonic and operands, but some disassemblers, e.g. Alpha's, use a tab separator instead; this results in a null pointer being passed as the haystack in g_strstr during a subsequent register search, i.e. undefined behavior, because of a missing null check. This patch adds tab to the separator search and a null check on the result. Also, an affected pointer is changed to const. Lastly, a break statement was added to immediately terminate the register search when a user-requested register is found in the current instruction as a trivial optimization, because searching for the remaining requested registers is unnecessary once one is found. Suggested-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Yodel Eldar <yodel.eldar@gmail.com> Message-ID: <20250630164124.26315-2-yodel.eldar@gmail.com> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-ID: <20250710104531.3099313-4-alex.bennee@linaro.org>
Diffstat (limited to 'scripts/qapi/source.py')
0 files changed, 0 insertions, 0 deletions