vbox的更動 39032 路徑 trunk/src/VBox/Runtime/r3/isofs.cpp
- 時間撮記:
- 2011-10-19 上午11:08:50 (13 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Runtime/r3/isofs.cpp
r34406 r39032 317 317 rc = VERR_FILE_NOT_FOUND; 318 318 319 uint8_t uBuffer[RTISOFS_SECTOR_SIZE];319 uint8_t abBuffer[RTISOFS_SECTOR_SIZE]; 320 320 size_t cbLeft = cbExtent; 321 321 while (!RT_SUCCESS(rc) && cbLeft > 0) 322 322 { 323 size_t cbRead; 324 int rc2 = RTFileRead(pFile->file, (void*)&uBuffer, sizeof(uBuffer), &cbRead); 325 Assert(RT_SUCCESS(rc2) && cbRead == RTISOFS_SECTOR_SIZE); 323 size_t cbRead = 0; 324 int rc2 = RTFileRead(pFile->file, &abBuffer[0], sizeof(abBuffer), &cbRead); 325 AssertRC(rc2); 326 Assert(cbRead == RTISOFS_SECTOR_SIZE); 326 327 cbLeft -= cbRead; 327 328 … … 329 330 while (idx < cbRead) 330 331 { 331 PRTISOFSDIRRECORD pCurRecord = (PRTISOFSDIRRECORD)& uBuffer[idx];332 PRTISOFSDIRRECORD pCurRecord = (PRTISOFSDIRRECORD)&abBuffer[idx]; 332 333 if (pCurRecord->record_length == 0) 333 334 break; … … 336 337 AssertPtr(pszName); 337 338 Assert(idx + sizeof(RTISOFSDIRRECORD) < cbRead); 338 memcpy(pszName, & uBuffer[idx + sizeof(RTISOFSDIRRECORD)], pCurRecord->name_len);339 memcpy(pszName, &abBuffer[idx + sizeof(RTISOFSDIRRECORD)], pCurRecord->name_len); 339 340 pszName[pCurRecord->name_len] = '\0'; /* Force string termination. */ 340 341
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器