VirtualBox

Changeset 107552 in vbox for trunk


Ignore:
Timestamp:
Jan 9, 2025 8:37:51 AM (10 days ago)
Author:
vboxsync
Message:

Main/src-server/UefiVariableStoreImpl.cpp: Missing error check and add exception for debug only use of a variable, bugref:3409

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/UefiVariableStoreImpl.cpp

    r106061 r107552  
    374374
    375375        vrc = RTVfsDirReadEx(hVfsDir, &DirEntry, NULL, RTFSOBJATTRADD_NOTHING);
    376         for (;;)
     376        if (RT_SUCCESS(vrc))
    377377        {
    378             RTUUID OwnerUuid;
    379             vrc = i_uefiVarStoreQueryVarOwnerUuid(DirEntry.szName, &OwnerUuid);
    380             if (RT_FAILURE(vrc))
    381                 break;
    382 
    383             aNames.push_back(Utf8Str(DirEntry.szName));
    384             aOwnerUuids.push_back(com::Guid(OwnerUuid));
    385 
    386             vrc = RTVfsDirReadEx(hVfsDir, &DirEntry, NULL, RTFSOBJATTRADD_NOTHING);
    387             if (RT_FAILURE(vrc))
    388                 break;
     378            for (;;)
     379            {
     380                RTUUID OwnerUuid;
     381                vrc = i_uefiVarStoreQueryVarOwnerUuid(DirEntry.szName, &OwnerUuid);
     382                if (RT_FAILURE(vrc))
     383                    break;
     384
     385                aNames.push_back(Utf8Str(DirEntry.szName));
     386                aOwnerUuids.push_back(com::Guid(OwnerUuid));
     387
     388                vrc = RTVfsDirReadEx(hVfsDir, &DirEntry, NULL, RTFSOBJATTRADD_NOTHING);
     389                if (RT_FAILURE(vrc))
     390                    break;
     391            }
     392
     393            if (vrc == VERR_NO_MORE_FILES)
     394                vrc = VINF_SUCCESS;
    389395        }
    390 
    391         if (vrc == VERR_NO_MORE_FILES)
    392             vrc = VINF_SUCCESS;
    393396
    394397        RTVfsDirRelease(hVfsDir);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette