aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-finishbreakpoint.c
diff options
context:
space:
mode:
authorHannes Domani <ssbssa@yahoo.de>2024-10-27 19:30:38 +0100
committerHannes Domani <ssbssa@yahoo.de>2024-10-28 21:00:12 +0100
commitf951f2dbb8f57fa6469a6935116a31004c7e373a (patch)
treeef6728c836c0c0002bb89b8b7b7c29c626327161 /gdb/python/py-finishbreakpoint.c
parent2930265f05600c1fd1ecdf2eb0889d977079ef78 (diff)
downloadgdb-f951f2dbb8f57fa6469a6935116a31004c7e373a.zip
gdb-f951f2dbb8f57fa6469a6935116a31004c7e373a.tar.gz
gdb-f951f2dbb8f57fa6469a6935116a31004c7e373a.tar.bz2
Don't copy memory for arguments if there are none
If amd64_windows_push_arguments is called with no arguments, then ARGS can be NULL, and inside the passed-by-pointer block, memcpy is called with this NULL, which is undefined behavior. So this just disable the passed-by-pointer block if there are no arguments. Fixes the following ubsan error: C:/gdb/src/gdb.git/gdb/amd64-windows-tdep.c:244:12: runtime error: null pointer passed as argument 2, which is declared to never be null Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/python/py-finishbreakpoint.c')
0 files changed, 0 insertions, 0 deletions