VirtualBox

Changeset 83246 in vbox for trunk


Ignore:
Timestamp:
Mar 10, 2020 1:20:06 PM (5 years ago)
Author:
vboxsync
Message:

bugref:9637. Some parameter checking.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibSeamless.cpp

    r83143 r83246  
    173173VBGLR3DECL(int) VbglR3SeamlessSendMonitorPositions(uint32_t cPositions, PRTPOINT pPositions)
    174174{
     175    if (!pPositions || cPositions <= 0)
     176        return VERR_INVALID_PARAMETER;
     177
    175178    VMMDevVideoUpdateMonitorPositions *pReq;
    176179    int rc;
    177180
    178     AssertPtrReturn(pPositions, VERR_INVALID_PARAMETER);
    179 
    180181    rc = vbglR3GRAlloc((VMMDevRequestHeader **)&pReq,
    181182                         sizeof(VMMDevVideoUpdateMonitorPositions)
    182                        + cPositions * sizeof(RTPOINT)
    183                        - sizeof(RTPOINT),
     183                       + (cPositions - 1) * sizeof(RTPOINT),
    184184                       VMMDevReq_VideoUpdateMonitorPositions);
    185185    if (RT_SUCCESS(rc))
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