Laurent Vivier
0969e00b39
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>
2022-01-09 12:03:21 +01:00
..
2021-10-27 14:45:22 +02:00
2022-01-07 19:30:13 -05:00
2021-10-12 08:20:08 +02:00
2021-06-28 07:27:32 -07:00
2022-01-07 17:24:24 -08:00
2021-12-31 01:05:27 +01:00
2021-12-17 10:43:24 +01:00
2022-01-07 05:19:55 -05:00
2021-12-15 10:11:34 +00:00
2022-01-05 09:06:36 +01:00
2021-04-09 16:05:16 -04:00
2021-05-02 17:24:51 +02:00
2022-01-06 06:11:39 -05:00
2022-01-08 15:46:09 +10:00
2021-10-12 08:20:08 +02:00
2021-06-02 06:51:09 +02:00
2021-12-30 17:16:32 +01:00
2021-10-12 08:20:08 +02:00
2022-01-07 19:30:13 -05:00
2021-12-31 01:05:27 +01:00
2021-10-31 21:05:40 +01:00
2022-01-08 15:46:09 +10:00
2021-09-30 13:42:10 +01:00
2021-07-08 14:15:01 -05:00
2021-10-18 00:41:36 +02:00
2022-01-09 12:03:21 +01:00
2021-11-11 03:13:05 -05:00
2021-12-15 08:38:16 +01:00
2021-12-06 11:57:36 +01:00
2021-12-30 17:16:32 +01:00
2022-01-07 05:19:55 -05:00
2021-05-02 17:24:51 +02:00
2021-09-30 13:42:10 +01:00
2021-12-31 01:05:27 +01:00
2021-12-31 01:05:27 +01:00
2021-05-02 17:24:51 +02:00
2022-01-07 05:19:55 -05:00
2021-10-15 16:06:35 +02:00
2022-01-04 07:55:34 +01:00
2021-05-02 17:24:50 +02:00
2022-01-05 09:06:36 +01:00
2021-11-02 15:55:14 +00:00
2021-10-04 09:47:26 +02:00
2022-01-08 15:46:09 +10:00
2021-11-15 18:53:00 +00:00
2021-05-03 10:07:41 +02:00
2022-01-05 09:06:36 +01:00
2022-01-07 19:30:13 -05:00
2021-12-30 17:16:32 +01:00
2021-09-20 08:50:59 +02:00
2021-10-30 18:39:37 +02:00
2022-01-07 05:19:55 -05:00
2021-09-08 11:09:45 +01:00
2021-12-15 08:38:16 +01:00
2021-10-22 09:52:17 +02:00
2021-10-30 18:39:37 +02:00
2021-10-02 08:43:21 +02:00
2021-07-20 20:10:21 +02:00
2021-12-31 01:05:27 +01:00
2021-11-17 11:25:55 -07:00
2022-01-07 19:30:13 -05:00
2021-11-02 15:57:27 +01:00
2021-11-01 19:36:11 -04:00
2020-08-21 06:30:33 -04:00
2021-05-02 17:24:51 +02:00
2021-09-30 13:42:10 +01:00
2021-06-17 07:10:32 -05:00