VirtualBox

Changeset 89392 in vbox for trunk


Ignore:
Timestamp:
May 31, 2021 10:55:21 AM (4 years ago)
Author:
vboxsync
Message:

BIOS: Allocate bounce buffer before using it.

File:
1 edited

Legend:

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

    r89384 r89392  
    483483                      cdemu->emulated_drive, cdemu->media, cdemu->ilba);
    484484
     485    /* Now that we know El Torito emulation is in use, allocate buffer. */
     486    cdemu->ptr_unaligned = cdemu_bounce_buf_alloc() :> 0;
     487    if (cdemu->ptr_unaligned == NULL)
     488        return 13;
     489
    485490    /* Read the disk image's boot sector into memory. */
    486491    error = cdemu_read(device, 0, nbsectors, MK_FP(boot_segment,0));
    487492    if (error != 0)
    488         return 13;
    489 
    490     cdemu->ptr_unaligned = cdemu_bounce_buf_alloc() :> 0;
    491     if (cdemu->ptr_unaligned == NULL)
    492493        return 14;
    493494
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