Changeset 27735 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Mar 26, 2010 12:56:00 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 59365
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/VmdkHDDCore.cpp
r27623 r27735 3093 3093 * alocate more than 128K, because that's no valid descriptor file 3094 3094 * and will result in the correct "truncated read" error handling. */ 3095 uint64_t cb Size;3096 rc = vmdkFileGetSize(pFile, &cb Size);3095 uint64_t cbFileSize; 3096 rc = vmdkFileGetSize(pFile, &cbFileSize); 3097 3097 if (RT_FAILURE(rc)) 3098 3098 goto out; 3099 3100 uint64_t cbSize = cbFileSize; 3099 3101 if (cbSize % VMDK_SECTOR2BYTE(10)) 3100 3102 cbSize += VMDK_SECTOR2BYTE(20) - cbSize % VMDK_SECTOR2BYTE(10); … … 3112 3114 size_t cbRead; 3113 3115 rc = vmdkFileReadAt(pImage->pFile, 0, pImage->pDescData, 3114 pImage->cbDescAlloc, &cbRead); 3116 RT_MIN(pImage->cbDescAlloc, cbFileSize), 3117 &cbRead); 3115 3118 if (RT_FAILURE(rc)) 3116 3119 {
Note:
See TracChangeset
for help on using the changeset viewer.