VirtualBox

Changeset 31746 in vbox


Ignore:
Timestamp:
Aug 18, 2010 10:08:52 AM (14 years ago)
Author:
vboxsync
Message:

Main: Added input validations missing in r64842.

Location:
trunk/src/VBox/Main
Files:
3 edited

Legend:

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

    r31745 r31746  
    12251225
    12261226    CheckComArgExpr(aPID, aPID > 0);
    1227 
     1227    if (aSize < 0)
     1228        return setError(E_INVALIDARG, tr("The size argument (%lld) is negative"), aSize);
    12281229    if (aFlags != 0) /* Flags are not supported at the moment. */
    1229         return E_INVALIDARG;
     1230        return setError(E_INVALIDARG, tr("Unknown flags (%#x)"), aFlags);
    12301231
    12311232    AutoCaller autoCaller(this);
  • trunk/src/VBox/Main/MachineImpl.cpp

    r31742 r31746  
    56205620    LogFlowThisFunc(("\n"));
    56215621    CheckComArgOutSafeArrayPointerValid(aData);
     5622    if (aSize < 0)
     5623        return setError(E_INVALIDARG, tr("The size argument (%lld) is negative"), aSize);
    56225624
    56235625    AutoCaller autoCaller(this);
  • trunk/src/VBox/Main/MediumImpl.cpp

    r31712 r31746  
    21312131{
    21322132    CheckComArgOutPointerValid(aProgress);
     2133    if (aLogicalSize < 0)
     2134        return setError(E_INVALIDARG, tr("The medium size argument (%lld) is negative"), aLogicalSize);
    21332135
    21342136    AutoCaller autoCaller(this);
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