VirtualBox

Changeset 35790 in vbox


Ignore:
Timestamp:
Jan 31, 2011 3:35:27 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
69761
Message:

DisplayImpl: check input parameters in TakeScreenshot* methods.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/DisplayImpl.cpp

    r35760 r35790  
    23492349    CheckComArgExpr(height, height != 0);
    23502350
     2351    /* Do not allow too large screenshots. This also filters out negative
     2352     * values passed as either 'width' or 'height'.
     2353     */
     2354    CheckComArgExpr(width, width <= 32767);
     2355    CheckComArgExpr(height, height <= 32767);
     2356
    23512357    AutoCaller autoCaller(this);
    23522358    if (FAILED(autoCaller.rc())) return autoCaller.rc();
     
    23982404    CheckComArgExpr(height, height != 0);
    23992405
     2406    /* Do not allow too large screenshots. This also filters out negative
     2407     * values passed as either 'width' or 'height'.
     2408     */
     2409    CheckComArgExpr(width, width <= 32767);
     2410    CheckComArgExpr(height, height <= 32767);
     2411
    24002412    AutoCaller autoCaller(this);
    24012413    if (FAILED(autoCaller.rc())) return autoCaller.rc();
     
    24702482    CheckComArgExpr(width, width != 0);
    24712483    CheckComArgExpr(height, height != 0);
     2484
     2485    /* Do not allow too large screenshots. This also filters out negative
     2486     * values passed as either 'width' or 'height'.
     2487     */
     2488    CheckComArgExpr(width, width <= 32767);
     2489    CheckComArgExpr(height, height <= 32767);
    24722490
    24732491    AutoCaller autoCaller(this);
Note: See TracChangeset for help on using the changeset viewer.

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