aboutsummaryrefslogtreecommitdiff
path: root/include/exec/ramblock.h
diff options
context:
space:
mode:
authorPrasad J Pandit <pjp@fedoraproject.org>2020-05-26 16:47:43 +0530
committerPaolo Bonzini <pbonzini@redhat.com>2020-06-10 12:10:50 -0400
commit77f55eac6c433e23e82a1b88b2d74f385c4c7d82 (patch)
treef0a31aa10d21136397cee350fe1c56006a5d20f3 /include/exec/ramblock.h
parentf2dfe54c74f768a5bf78c9e5918918727f9d9459 (diff)
exec: set map length to zero when returning NULL
When mapping physical memory into host's virtual address space, 'address_space_map' may return NULL if BounceBuffer is in_use. Set and return '*plen = 0' to avoid later NULL pointer dereference. Reported-by: Alexander Bulekov <alxndr@bu.edu> Fixes: https://bugs.launchpad.net/qemu/+bug/1878259 Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Suggested-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org> Message-Id: <20200526111743.428367-1-ppandit@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/exec/ramblock.h')
0 files changed, 0 insertions, 0 deletions