VirtualBox

儲存庫 vbox 的更動 18347


忽略:
時間撮記:
2009-3-26 下午07:23:37 (16 年 以前)
作者:
vboxsync
訊息:

Storage/VMDK: fix reading certain VMDK files which have unusual quoting. The specs really leave a lot to be desired.

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Devices/Storage/VmdkHDDCore.cpp

    r18331 r18347  
    13911391    while (*pszStr == ' ' || *pszStr == '\t')
    13921392        pszStr++;
    1393     if (*pszStr++ != '"')
    1394         return vmdkError(pImage, VERR_VD_VMDK_INVALID_HEADER, RT_SRC_POS, N_("VMDK: incorrectly quoted value in descriptor in '%s'"), pImage->pszFilename);
    1395 
    1396     pszQ = (char *)strchr(pszStr, '"');
    1397     if (pszQ == NULL)
    1398         return vmdkError(pImage, VERR_VD_VMDK_INVALID_HEADER, RT_SRC_POS, N_("VMDK: incorrectly quoted value in descriptor in '%s'"), pImage->pszFilename);
     1393
     1394    if (*pszStr != '"')
     1395    {
     1396        pszQ = (char *)pszStr;
     1397        while (*pszQ && *pszQ != ' ' && *pszQ != '\t')
     1398            pszQ++;
     1399    }
     1400    else
     1401    {
     1402        pszStr++;
     1403        pszQ = (char *)strchr(pszStr, '"');
     1404        if (pszQ == NULL)
     1405            return vmdkError(pImage, VERR_VD_VMDK_INVALID_HEADER, RT_SRC_POS, N_("VMDK: incorrectly quoted value in descriptor in '%s'"), pImage->pszFilename);
     1406    }
     1407
    13991408    pszUnquoted = (char *)RTMemTmpAlloc(pszQ - pszStr + 1);
    14001409    if (!pszUnquoted)
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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