VirtualBox

Changeset 29512 in vbox


Ignore:
Timestamp:
May 17, 2010 9:30:12 AM (15 years ago)
Author:
vboxsync
Message:

Main/GuestImpl: more correct handling of the RTStrAPrintf() result

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/GuestImpl.cpp

    r29460 r29512  
    781781            AssertReturn(papszArgv, E_OUTOFMEMORY);
    782782            for (unsigned i = 0; RT_SUCCESS(vrc) && i < uNumArgs; i++)
    783                 vrc = RTStrAPrintf(&papszArgv[i], "%s", Utf8Str(args[i]).raw());
     783            {
     784                int cbLen = RTStrAPrintf(&papszArgv[i], "%s", Utf8Str(args[i]).raw());
     785                if (cbLen < 0)
     786                    vrc = VERR_NO_MEMORY;
     787
     788            }
    784789            papszArgv[uNumArgs] = NULL;
    785790        }
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