Changeset 72953 in vbox
- Timestamp:
- Jul 7, 2018 6:20:59 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/isofs.cpp
r69111 r72953 172 172 while ((cbLeft > 0) && RT_SUCCESS(rc)) 173 173 { 174 AssertReturn(cbLeft >= sizeof(RTISOFSPATHTABLEHEADER), VERR_INVALID_PARAMETER); 174 175 size_t cbRead; 175 176 rc = RTFileRead(pFile->file, (RTISOFSPATHTABLEHEADER*)&header, sizeof(RTISOFSPATHTABLEHEADER), &cbRead); 176 if (RT_FAILURE(rc) )177 if (RT_FAILURE(rc) || cbRead == 0) 177 178 break; 178 179 cbLeft -= cbRead; 179 180 if (header.length) 180 181 { 181 Assert (cbLeft >= header.length);182 Assert (header.length <= 31);182 AssertReturn(cbLeft >= header.length, VERR_INVALID_PARAMETER); 183 AssertReturn(header.length <= 31, VERR_INVALID_PARAMETER); 183 184 /* Allocate and read in the actual path name. */ 184 185 char *pszName = RTStrAlloc(header.length + 1); … … 201 202 } 202 203 203 /* Transform path names into full paths. This is a bit ugly right now. */ 204 PRTISOFSPATHTABLEENTRY pNode = RTListGetLast(&pFile->listPaths, RTISOFSPATHTABLEENTRY, Node); 205 while ( pNode 206 && !RTListNodeIsFirst(&pFile->listPaths, &pNode->Node) 207 && RT_SUCCESS(rc)) 208 { 209 rc = rtIsoFsGetParentPathSub(&pFile->listPaths, pNode, 210 pNode->path, &pNode->path_full); 211 if (RT_SUCCESS(rc)) 212 pNode = RTListNodeGetPrev(&pNode->Node, RTISOFSPATHTABLEENTRY, Node); 204 if (RT_SUCCESS(rc)) 205 { 206 /* Transform path names into full paths. This is a bit ugly right now. */ 207 PRTISOFSPATHTABLEENTRY pNode = RTListGetLast(&pFile->listPaths, RTISOFSPATHTABLEENTRY, Node); 208 while ( pNode 209 && !RTListNodeIsFirst(&pFile->listPaths, &pNode->Node) 210 && RT_SUCCESS(rc)) 211 { 212 rc = rtIsoFsGetParentPathSub(&pFile->listPaths, pNode, 213 pNode->path, &pNode->path_full); 214 if (RT_SUCCESS(rc)) 215 pNode = RTListNodeGetPrev(&pNode->Node, RTISOFSPATHTABLEENTRY, Node); 216 } 213 217 } 214 218
Note:
See TracChangeset
for help on using the changeset viewer.