VirtualBox

Changeset 64711 in vbox for trunk


Ignore:
Timestamp:
Nov 18, 2016 11:45:00 AM (8 years ago)
Author:
vboxsync
Message:

VD: Check that the size is aligned to a 512 byte sector boundary

Location:
trunk/src/VBox/Storage
Files:
2 edited

Legend:

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

    r64272 r64711  
    70137013                           ("cbSize=%llu\n", cbSize),
    70147014                           rc = VERR_INVALID_PARAMETER);
     7015        AssertMsgBreakStmt(!(cbSize % 512),
     7016                           ("cbSize=%llu\n", cbSize),
     7017                           rc = VERR_VD_INVALID_SIZE);
    70157018        AssertMsgBreakStmt(   ((uImageFlags & ~VD_IMAGE_FLAGS_MASK) == 0)
    70167019                           || ((uImageFlags & (VD_IMAGE_FLAGS_FIXED | VD_IMAGE_FLAGS_DIFF)) != VD_IMAGE_FLAGS_FIXED),
  • trunk/src/VBox/Storage/VDI.cpp

    r64693 r64711  
    14151415    if (   !cbSize
    14161416        || cbSize >= _1P * 4 - _1M * 3
    1417         || cbSize < VDI_IMAGE_DEFAULT_BLOCK_SIZE)
     1417        || cbSize < VDI_IMAGE_DEFAULT_BLOCK_SIZE
     1418        || (cbSize % 512))
    14181419        return VERR_VD_INVALID_SIZE;
    14191420
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