VirtualBox

Ignore:
Timestamp:
Mar 31, 2009 12:29:16 PM (16 years ago)
Author:
vboxsync
Message:

Storage/VDI: add maximum size check when creating VDI files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/VDIHDDCore.cpp

    r18506 r18567  
    871871    {
    872872        rc = VERR_INVALID_PARAMETER;
     873        goto out;
     874    }
     875
     876    /* Check size. Maximum 2PB-3M (to be on the safe side). No tricks with
     877     * adjusting the 1M block size so far, which would extend the size. */
     878    if (    !cbSize
     879        ||  cbSize >= _1P * 2 - _1M * 3)
     880    {
     881        rc = VERR_VD_INVALID_SIZE;
    873882        goto out;
    874883    }
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