Changeset 50526 in vbox for trunk/src/VBox
- Timestamp:
- Feb 20, 2014 5:01:32 PM (11 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/Makefile.kmk
r50458 r50526 264 264 common/checksum/adler32.cpp \ 265 265 common/checksum/crc32.cpp \ 266 common/checksum/crc32c.cpp \ 266 267 common/checksum/crc64.cpp \ 267 268 common/checksum/md5.cpp \ -
trunk/src/VBox/Storage/VHDX.cpp
r48861 r50526 1064 1064 u32ChkSumSaved = pHdr1->u32Checksum; 1065 1065 pHdr1->u32Checksum = 0; 1066 //u32ChkSum = RTCrc32C(pHdr1, RT_OFFSETOF(VhdxHeader, u8Reserved[502]));1066 u32ChkSum = RTCrc32C(pHdr1, sizeof(VhdxHeader)); 1067 1067 1068 1068 if ( pHdr1->u32Signature == VHDX_HEADER_SIGNATURE 1069 /*&& u32ChkSum == u32ChkSumSaved*/)1069 && u32ChkSum == u32ChkSumSaved) 1070 1070 fHdr1Valid = true; 1071 1071 } … … 1081 1081 u32ChkSumSaved = pHdr2->u32Checksum; 1082 1082 pHdr2->u32Checksum = 0; 1083 //u32ChkSum = RTCrc32C(pHdr2, RT_OFFSETOF(VhdxHeader, u8Reserved[502]));1083 u32ChkSum = RTCrc32C(pHdr2, sizeof(VhdxHeader)); 1084 1084 1085 1085 if ( pHdr2->u32Signature == VHDX_HEADER_SIGNATURE 1086 /*&& u32ChkSum == u32ChkSumSaved*/)1086 && u32ChkSum == u32ChkSumSaved) 1087 1087 fHdr2Valid = true; 1088 1088 } … … 1571 1571 1572 1572 /* Verify the region table integrity. */ 1573 //u32ChkSum = RTCrc32C(pbRegionTbl, VHDX_REGION_TBL_SIZE_MAX);1573 u32ChkSum = RTCrc32C(pbRegionTbl, VHDX_REGION_TBL_SIZE_MAX); 1574 1574 1575 1575 if (RegionTblHdr.u32Signature != VHDX_REGION_TBL_HDR_SIGNATURE) … … 1577 1577 "VHDX: Invalid signature for region table header of image \'%s\'", 1578 1578 pImage->pszFilename); 1579 #if 01580 1579 else if (u32ChkSum != RegionTblHdr.u32Checksum) 1581 1580 rc = vdIfError(pImage->pIfError, VERR_VD_GEN_INVALID_HEADER, RT_SRC_POS, 1582 1581 "VHDX: CRC32 checksum mismatch for the region table of image \'%s\' (expected %#x got %#x)", 1583 1582 pImage->pszFilename, RegionTblHdr.u32Checksum, u32ChkSum); 1584 #endif1585 1583 else if (RegionTblHdr.u32EntryCount > VHDX_REGION_TBL_HDR_ENTRY_COUNT_MAX) 1586 1584 rc = vdIfError(pImage->pIfError, VERR_VD_GEN_INVALID_HEADER, RT_SRC_POS,
Note:
See TracChangeset
for help on using the changeset viewer.