Changeset 72577 in vbox for trunk/src/VBox/Storage
- Timestamp:
- Jun 15, 2018 9:31:58 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Storage/VHD.cpp
r72574 r72577 47 47 #define VHD_MAX_SIZE (2 * _1T) 48 48 /** Maximum number of 512 byte sectors for a VHD image. */ 49 #define VHD_MAX_SECTORS ( (uint32_t)(VHD_MAX_SIZE / VHD_SECTOR_SIZE))49 #define VHD_MAX_SECTORS (VHD_MAX_SIZE / VHD_SECTOR_SIZE) 50 50 51 51 /* This is common to all VHD disk types and is located at the end of the image */ … … 756 756 AssertMsg(!(pImage->cbDataBlock % VHD_SECTOR_SIZE), ("%s: Data block size is not a multiple of %!\n", __FUNCTION__, VHD_SECTOR_SIZE)); 757 757 758 /* Bail out if the number of BAT entries exceeds the number of sectors for a maximum image. */ 759 if (pImage->cBlockAllocationTableEntries > VHD_MAX_SECTORS) 758 /* 759 * Bail out if the number of BAT entries exceeds the number of sectors for a maximum image. 760 * Lower the number of sectors in the BAT as a few sectors are already occupied by the footers 761 * and headers. 762 */ 763 if (pImage->cBlockAllocationTableEntries > (VHD_MAX_SECTORS - 2)) 760 764 return VERR_VD_VHD_INVALID_HEADER; 761 765
Note:
See TracChangeset
for help on using the changeset viewer.