diff --git a/hw/mips_malta.c b/hw/mips_malta.c index 97431b1e62..03db2f8a6c 100644 --- a/hw/mips_malta.c +++ b/hw/mips_malta.c @@ -533,7 +533,7 @@ void mips_malta_init (int ram_size, int vga_ram_size, int boot_device, } else { snprintf(buf, sizeof(buf), "%s/%s", bios_dir, BIOS_FILENAME); ret = load_image(buf, phys_ram_base + bios_offset); - if (ret != BIOS_SIZE) { + if (ret < 0 || ret > BIOS_SIZE) { fprintf(stderr, "qemu: Warning, could not load MIPS bios '%s'\n", buf); exit(1);