Changeset 93089 in vbox for trunk/src/VBox/Main/src-server/UnattendedInstaller.cpp
- Timestamp:
- Dec 27, 2021 11:20:36 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/UnattendedInstaller.cpp
r93085 r93089 915 915 */ 916 916 uint8_t *pbBootSector = NULL; 917 uint64_toff = 0;917 RTFOFF off = 0; 918 918 bool fEof = false; 919 919 uint8_t abBuf[_8K] = {0}; … … 959 959 /* skip */ 960 960 pbCur = pbHit - 510 + 1; 961 cbLeft = &abBuf[sizeof(abBuf)] -pbCur;961 cbLeft = (uintptr_t)&abBuf[sizeof(abBuf)] - (uintptr_t)pbCur; 962 962 } 963 963 } while (!fEof); … … 1306 1306 else 1307 1307 break; 1308 cchSrc -= pszHit0 - pszSrc+ 1;1308 cchSrc -= (size_t)(pszHit0 - pszSrc) + 1; 1309 1309 pszSrc = pszHit0 + 1; 1310 1310 } … … 1336 1336 pszFileToSplit, pszMarker - pszStart, pszMarker); 1337 1337 pszMarker += sizeof("START[") - 1; 1338 const char *pszTail = splitFileLocateSubstring(pszMarker, pszEnd - pszMarker, RT_STR_TUPLE("]@@"));1338 const char *pszTail = splitFileLocateSubstring(pszMarker, (size_t)(pszEnd - pszMarker), RT_STR_TUPLE("]@@")); 1339 1339 if ( !pszTail 1340 1340 || pszTail - pszMarker > 64 … … 1345 1345 return mpParent->setErrorBoth(E_FAIL, VERR_PARSE_ERROR, 1346 1346 tr("Malformed splitter tag in '%s' at offset %p: @@VBOX_SPLITTER_START[%.64s"), 1347 pszFileToSplit, pszMarker - pszStart, pszMarker);1347 pszFileToSplit, (size_t)(pszEnd - pszMarker), pszMarker); 1348 1348 int vrc = RTStrValidateEncodingEx(pszMarker, pszTail - pszMarker, RTSTR_VALIDATE_ENCODING_EXACT_LENGTH); 1349 1349 if (RT_FAILURE(vrc)) 1350 1350 return mpParent->setErrorBoth(E_FAIL, vrc, 1351 1351 tr("Malformed splitter tag in '%s' at offset %p: @@VBOX_SPLITTER_START[%.*Rhxs"), 1352 pszFileToSplit, pszMarker - pszStart, pszTail - pszMarker, pszMarker);1352 pszFileToSplit, (size_t)(pszEnd - pszMarker), pszTail - pszMarker, pszMarker); 1353 1353 const char *pszFilename; 1354 1354 try … … 1381 1381 return mpParent->setErrorBoth(E_FAIL, VERR_PARSE_ERROR, 1382 1382 tr("Unexpected splitter tag in '%s' at offset %p: @@VBOX_SPLITTER_%.64s"), 1383 pszFileToSplit, pszMarker - pszStart, pszMarker);1383 pszFileToSplit, (size_t)(pszEnd - pszMarker), pszMarker); 1384 1384 pszMarker += sizeof("END[") - 1; 1385 1385 size_t const cchFilename = strlen(pszFilename); … … 1390 1390 return mpParent->setErrorBoth(E_FAIL, VERR_PARSE_ERROR, 1391 1391 tr("Mismatching splitter tag for '%s' in '%s' at offset %p: @@VBOX_SPLITTER_END[%.64Rhxs"), 1392 pszFilename, pszFileToSplit, pszMarker - pszStart, pszMarker);1392 pszFilename, pszFileToSplit, (size_t)(pszEnd - pszMarker), pszMarker); 1393 1393 1394 1394 /* Advance. */ 1395 1395 pszSrc = pszMarker + cchFilename + sizeof("]@@") - 1; 1396 cbLeft = pszEnd - pszSrc;1396 cbLeft = (size_t)(pszEnd - pszSrc); 1397 1397 1398 1398 /* … … 1409 1409 if (RT_SUCCESS(vrc)) 1410 1410 { 1411 vrc = RTFileWrite(hFile, pszDocStart, pszDocEnd - pszDocStart, NULL);1411 vrc = RTFileWrite(hFile, pszDocStart, (size_t)(pszDocEnd - pszDocStart), NULL); 1412 1412 if (RT_SUCCESS(vrc)) 1413 1413 vrc = RTFileClose(hFile);
Note:
See TracChangeset
for help on using the changeset viewer.