儲存庫 vbox 的更動 66080
- 時間撮記:
- 2017-3-14 上午10:42:55 (8 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Runtime/common/checksum/manifest2.cpp
r62564 r66080 65 65 bool fVisited; 66 66 /** The normalized property name that StrCore::pszString points at. */ 67 char szName[ 1];67 char szName[RT_FLEXIBLE_ARRAY]; 68 68 } RTMANIFESTATTR; 69 69 /** Pointer to a manifest attribute. */ … … 86 86 bool fVisited; 87 87 /** The normalized entry name that StrCore::pszString points at. */ 88 char szName[ 1];88 char szName[RT_FLEXIBLE_ARRAY_NESTED]; 89 89 } RTMANIFESTENTRY; 90 90 /** Pointer to a manifest entry. */ … … 193 193 AssertPtr(phManifest); 194 194 195 RTMANIFESTINT *pThis = (RTMANIFESTINT *)RTMemAlloc( sizeof(*pThis));195 RTMANIFESTINT *pThis = (RTMANIFESTINT *)RTMemAlloc(RT_UOFFSETOF(RTMANIFESTINT, SelfEntry.szName[1])); 196 196 if (!pThis) 197 197 return VERR_NO_MEMORY; … … 698 698 else 699 699 { 700 size_t 701 pAttr = (PRTMANIFESTATTR)RTMemAllocVar(RT_ OFFSETOF(RTMANIFESTATTR, szName[cbName]));700 size_t const cbName = strlen(pszAttr) + 1; 701 pAttr = (PRTMANIFESTATTR)RTMemAllocVar(RT_UOFFSETOF(RTMANIFESTATTR, szName[cbName])); 702 702 if (!pAttr) 703 703 { … … 1065 1065 if (rc == VERR_NOT_FOUND) 1066 1066 { 1067 pEntry = (PRTMANIFESTENTRY)RTMemAlloc(RT_ OFFSETOF(RTMANIFESTENTRY, szName[cchEntry + 1]));1067 pEntry = (PRTMANIFESTENTRY)RTMemAlloc(RT_UOFFSETOF(RTMANIFESTENTRY, szName[cchEntry + 1])); 1068 1068 if (!pEntry) 1069 1069 return VERR_NO_MEMORY; … … 1191 1191 if (rc == VERR_NOT_FOUND) 1192 1192 { 1193 pEntry = (PRTMANIFESTENTRY)RTMemAlloc(RT_ OFFSETOF(RTMANIFESTENTRY, szName[cchEntry + 1]));1193 pEntry = (PRTMANIFESTENTRY)RTMemAlloc(RT_UOFFSETOF(RTMANIFESTENTRY, szName[cchEntry + 1])); 1194 1194 if (pEntry) 1195 1195 {
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器