VirtualBox

Changeset 90988 in vbox


Ignore:
Timestamp:
Aug 30, 2021 8:45:10 AM (3 years ago)
Author:
vboxsync
Message:

Storage/VHD: Don't return an error when allocating the last block in a VHD image and the disk image size not being aligned on the VD block size. ticketref:20512

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Storage/VHD.cpp

    r90802 r90988  
    16441644    AssertPtrReturn(pIoCtx, VERR_INVALID_POINTER);
    16451645    AssertReturn(cbToWrite, VERR_INVALID_PARAMETER);
    1646     AssertReturn(uOffset + cbToWrite <= pImage->cbSize, VERR_INVALID_PARAMETER);
     1646    AssertReturn(uOffset + cbToWrite <= RT_ALIGN_64(pImage->cbSize, pImage->cbDataBlock), VERR_INVALID_PARAMETER); /* The image size might not be on a data block size boundary. */
    16471647
    16481648    if (pImage->pBlockAllocationTable)
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