VirtualBox

Changeset 20473 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jun 11, 2009 8:51:01 AM (16 years ago)
Author:
vboxsync
Message:

VHD: Fix crash reported on vbox-dev when discarding snapshots (missing check if a parent filename is actually existing)

File:
1 edited

Legend:

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

    r20416 r20473  
    359359    ddh.ParentTimeStamp = RT_H2BE_U32(pImage->u32ParentTimeStamp);
    360360    /* Update parent's filename. */
    361     rc = vhdFilenameToUtf16(RTPathFilename(pImage->pszParentFilename),
    362         ddh.ParentUnicodeName, sizeof(ddh.ParentUnicodeName) - 1, NULL);
    363     if (RT_FAILURE(rc))
    364         return rc;
     361    if (pImage->pszParentFilename)
     362    {
     363        rc = vhdFilenameToUtf16(RTPathFilename(pImage->pszParentFilename),
     364             ddh.ParentUnicodeName, sizeof(ddh.ParentUnicodeName) - 1, NULL);
     365        if (RT_FAILURE(rc))
     366            return rc;
     367    }
     368
    365369    /* Update parent's locators. */
    366370    for (i = 0; i < VHD_MAX_LOCATOR_ENTRIES; i++)
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