Changeset 56599 in vbox
- Timestamp:
- Jun 23, 2015 11:52:10 AM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 101228
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp
r56319 r56599 962 962 if (RT_SUCCESS(vrc) && pFile != NULL) 963 963 { 964 uint64_t cbFile = 0;965 uint 64_t maxFileSize = _1M;964 uint64_t cbFile64 = 0; 965 uint32_t maxFileSize = _1M; 966 966 size_t cbRead = 0; 967 size_t cbFile; 967 968 void *pBuf; /** @todo r=bird: You leak this buffer! throwing stuff is evil. */ 968 969 969 vrc = RTFileGetSize(pFile, &cbFile );970 if (cbFile > maxFileSize)970 vrc = RTFileGetSize(pFile, &cbFile64); 971 if (cbFile64 > maxFileSize) 971 972 throw setError(VBOX_E_FILE_ERROR, 972 973 tr("Size of the manifest file '%s' is bigger than 1Mb. Check it, please."), 973 974 RTPathFilename(strMfFile.c_str())); 974 975 976 cbFile = (size_t)cbFile64; /* We know it's <= 1M. */ 975 977 if (RT_SUCCESS(vrc)) 976 978 pBuf = RTMemAllocZ(cbFile);
Note:
See TracChangeset
for help on using the changeset viewer.