VirtualBox

Ticket #20512: changeset_146628.diff

File changeset_146628.diff, 711 bytes (added by Klaus Espenlaub, 4 years ago)
  • branches/VBox-6.1/src/VBox/Storage/VHD.cpp

     
    16401640    Assert(!(cbToWrite % VHD_SECTOR_SIZE));
    16411641    AssertReturn((VALID_PTR(pIoCtx) && cbToWrite), VERR_INVALID_PARAMETER);
    1642     AssertReturn(uOffset + cbToWrite <= pImage->cbSize, VERR_INVALID_PARAMETER);
     1642    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. */
    16431643
    16441644    if (pImage->pBlockAllocationTable)

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