VirtualBox

Changeset 44271 in vbox for trunk/src/VBox/Devices/PC


Ignore:
Timestamp:
Jan 10, 2013 5:21:07 PM (12 years ago)
Author:
vboxsync
Message:

BIOS: Sanity check El Torito boot sector count.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/BIOS/eltorito.c

    r44254 r44271  
    359359    cdemu->sector_count = nbsectors;
    360360
     361    /* Sanity check the sector count. In incorrectly mastered CDs, it might
     362     * be zero. If it's more than 512K, reject it as well.
     363     */
     364    if (nbsectors == 0 || nbsectors > 1024)
     365        return 12;
     366
    361367    lba = *((uint32_t *)&buffer[0x28]);
    362368    cdemu->ilba = lba;
     
    380386
    381387    if (error != 0)
    382         return 12;
     388        return 13;
    383389
    384390    BX_DEBUG_ELTORITO("Emulate drive %02x, type %02x, LBA %lu\n",
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette