aboutsummaryrefslogtreecommitdiff
path: root/hw/display/macfb.c
diff options
context:
space:
mode:
authorLaurent Vivier <laurent@vivier.eu>2022-01-07 11:50:49 +0100
committerLaurent Vivier <laurent@vivier.eu>2022-01-09 12:03:21 +0100
commit0969e00b3933a10a481f5bc13c834bf1abbc438d (patch)
treea891afb6ece48aedd585d971e23d5955e472df1c /hw/display/macfb.c
parent214bdf8e7199a34fe6f46ac7a83b61d8cc3f8ad0 (diff)
downloadqemu-0969e00b3933a10a481f5bc13c834bf1abbc438d.zip
qemu-0969e00b3933a10a481f5bc13c834bf1abbc438d.tar.gz
qemu-0969e00b3933a10a481f5bc13c834bf1abbc438d.tar.bz2
q800: fix segfault with invalid MacROM
"qemu-system-m68k -M q800 -bios /dev/null" crashes with a segfault in q800_init(). This happens because the code doesn't check that rom_ptr() returned a non-NULL pointer . To avoid NULL pointer, don't allow 0 sized file and use bios_size with rom_ptr(). Resolves: https://gitlab.com/qemu-project/qemu/-/issues/756 Reported-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Laurent Vivier <laurent@vivier.eu> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Message-Id: <20220107105049.961489-1-laurent@vivier.eu> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'hw/display/macfb.c')
0 files changed, 0 insertions, 0 deletions