VirtualBox

Changeset 66212 in vbox for trunk/src


Ignore:
Timestamp:
Mar 22, 2017 7:46:16 PM (8 years ago)
Author:
vboxsync
Message:

Storage/DMG: Fix opening a non DMG image file which is too small to contain the UDIF descriptor

File:
1 edited

Legend:

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

    r66211 r66212  
    17721772    else
    17731773        rc = RTVfsFileGetSize(hDmgFileInXar, &cbFile);
    1774     if (RT_SUCCESS(rc))
     1774    if (   RT_SUCCESS(rc)
     1775        && cbFile >= sizeof(DMGUDIF))
    17751776    {
    17761777        DMGUDIF  Ftr;
     
    18041805                rc = VERR_VD_DMG_INVALID_HEADER;
    18051806        }
     1807        else
     1808            rc = VERR_VD_DMG_INVALID_HEADER;
    18061809    }
    18071810    else
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