VirtualBox

Changeset 14462 in vbox for trunk


Ignore:
Timestamp:
Nov 21, 2008 2:17:21 PM (16 years ago)
Author:
vboxsync
Message:

VBoxGuest.cpp: VBoxGuestCommonIOCtl_HGCMCall size fix for the timed ioctl.

File:
1 edited

Legend:

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

    r14367 r14462  
    1 /* $Id:$ */
     1/* $Id$ */
    22/** @file
    33 * VBoxGuest - Guest Additions Driver.
     
    10521052                                         VBoxGuestHGCMCallInfo *pInfo,
    10531053                                         uint32_t cMillies, bool fInterruptible,
    1054                                          size_t cbData, size_t *pcbDataReturned)
     1054                                         size_t cbExtra, size_t cbData, size_t *pcbDataReturned)
    10551055{
    10561056    /*
     
    10621062        return VERR_INVALID_PARAMETER;
    10631063    }
    1064     const size_t cbActual = sizeof(*pInfo) + pInfo->cParms * sizeof(HGCMFunctionParameter);
     1064    const size_t cbActual = cbExtra + sizeof(*pInfo) + pInfo->cParms * sizeof(HGCMFunctionParameter);
    10651065    if (cbData < cbActual)
    10661066    {
     
    12631263        rc = VBoxGuestCommonIOCtl_HGCMCall(pDevExt, pSession, (VBoxGuestHGCMCallInfo *)pvData, RT_INDEFINITE_WAIT,
    12641264                                           fInterruptible,
    1265                                            cbData, pcbDataReturned);
     1265                                           0, cbData, pcbDataReturned);
    12661266    }
    12671267    else if (VBOXGUEST_IOCTL_STRIP_SIZE(iFunction) == VBOXGUEST_IOCTL_STRIP_SIZE(VBOXGUEST_IOCTL_HGCM_CALL_TIMED(0)))
     
    12711271        rc = VBoxGuestCommonIOCtl_HGCMCall(pDevExt, pSession, &pInfo->info, pInfo->u32Timeout,
    12721272                                           !!pInfo->fInterruptible || pSession->R0Process != NIL_RTR0PROCESS,
    1273                                            cbData, pcbDataReturned);
     1273                                           RT_OFFSETOF(VBoxGuestHGCMCallInfoTimed, info), cbData, pcbDataReturned);
    12741274    }
    12751275#endif /* VBOX_WITH_HGCM */
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