VirtualBox

Changeset 64693 in vbox for trunk/src/VBox/Storage


Ignore:
Timestamp:
Nov 17, 2016 4:44:38 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
111969
Message:

Storage/VDI: Check that the new size is within the supported range

File:
1 edited

Legend:

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

    r64504 r64693  
    24622462    PVDIIMAGEDESC pImage = (PVDIIMAGEDESC)pBackendData;
    24632463    int rc = VINF_SUCCESS;
     2464
     2465    /* Check size. Maximum 4PB-3M. No tricks with adjusting the 1M block size
     2466     * so far, which would extend the size. */
     2467    if (   !cbSize
     2468        || cbSize >= _1P * 4 - _1M * 3
     2469        || cbSize < VDI_IMAGE_DEFAULT_BLOCK_SIZE)
     2470        return VERR_VD_INVALID_SIZE;
    24642471
    24652472    /*
Note: See TracChangeset for help on using the changeset viewer.

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