VirtualBox

Changeset 54800 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Mar 16, 2015 9:28:32 PM (10 years ago)
Author:
vboxsync
Message:

fixed Interface information size calculation using GET_USBD_INTERFACE_SIZE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/VBoxUSB/win/dev/VBoxUsbRt.cpp

    r54784 r54800  
    634634                    for (i = 0; i < pDevExt->Rt.uNumInterfaces; i++)
    635635                    {
    636                         size_t uTotalIfaceInfoLength = RT_OFFSETOF(struct _USBD_INTERFACE_INFORMATION, Pipes[RT_MAX(pIfLe[i].Interface->NumberOfPipes, 1)]);
     636                        size_t uTotalIfaceInfoLength = GET_USBD_INTERFACE_SIZE(pIfLe[i].Interface->NumberOfPipes);
    637637                        pDevExt->Rt.pVBIfaceInfo[i].pInterfaceInfo = (PUSBD_INTERFACE_INFORMATION)vboxUsbMemAlloc(uTotalIfaceInfoLength);
    638638                        if (!pDevExt->Rt.pVBIfaceInfo[i].pInterfaceInfo)
     
    824824                for(ULONG i = 0; i < pIfInfo->NumberOfPipes; i++)
    825825                {
    826                     pDevExt->Rt.pVBIfaceInfo[InterfaceNumber].pInterfaceInfo->Pipes[i] = pIfInfo->Pipes[i];
    827826                    pDevExt->Rt.pVBIfaceInfo[InterfaceNumber].pPipeInfo[i].EndpointAddress = pIfInfo->Pipes[i].EndpointAddress;
    828827                    pDevExt->Rt.pVBIfaceInfo[InterfaceNumber].pPipeInfo[i].NextScheduledFrame = 0;
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