mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
disas/i386: Avoid NULL pointer dereference in error case
In a code path where we hit an internal disassembler error, execution would subsequently attempt to dereference a NULL pointer. This should never happen, but avoid the crash. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1488556233-31246-3-git-send-email-peter.maydell@linaro.org
This commit is contained in:
parent
6815a8a00a
commit
3f168b5d35
1 changed files with 1 additions and 1 deletions
|
@ -4043,7 +4043,7 @@ print_insn (bfd_vma pc, disassemble_info *info)
|
|||
}
|
||||
}
|
||||
|
||||
if (putop (dp->name, sizeflag) == 0)
|
||||
if (dp->name != NULL && putop (dp->name, sizeflag) == 0)
|
||||
{
|
||||
for (i = 0; i < MAX_OPERANDS; ++i)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue