VirtualBox

Changeset 80941 in vbox for trunk


Ignore:
Timestamp:
Sep 23, 2019 9:25:12 AM (5 years ago)
Author:
vboxsync
Message:

USB/win: Don't let the debug build kill the host just because bogus IOCTL input was passed in.

Location:
trunk/src/VBox/HostDrivers/VBoxUSB/win/mon
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbFlt.cpp

    r80891 r80941  
    12221222NTSTATUS VBoxUsbFltGetDevice(PVBOXUSBFLTCTX pContext, HVBOXUSBDEVUSR hDevice, PUSBSUP_GETDEV_MON pInfo)
    12231223{
    1224     Assert(hDevice);
     1224    if (!hDevice)
     1225       return STATUS_INVALID_PARAMETER;
    12251226
    12261227    memset (pInfo, 0, sizeof (*pInfo));
     
    12451246    VBOXUSBFLT_LOCK_RELEASE();
    12461247
    1247     /* this should not occur */
    1248     AssertFailed();
    1249 
     1248    /* We should not get this far with valid input. */
    12501249    return STATUS_INVALID_PARAMETER;
    12511250}
  • trunk/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbMon.cpp

    r80891 r80941  
    12251225            if (!pvBuffer || cbInBuffer != sizeof (hDevice) || cbOutBuffer < sizeof (*pOut))
    12261226            {
    1227                 WARN(("SUPUSBFLT_IOCTL_GET_DEVICE: Invalid input/output sizes. cbIn=%d expected %d. cbOut=%d expected >= %d.",
     1227                WARN(("SUPUSBFLT_IOCTL_GET_DEVICE: Invalid input/output sizes! cbIn=%d expected %d. cbOut=%d expected >= %d.",
     1228                        cbInBuffer, sizeof (hDevice), cbOutBuffer, sizeof (*pOut)));
     1229                Status = STATUS_INVALID_PARAMETER;
     1230                break;
     1231            }
     1232            if (!hDevice)
     1233            {
     1234                WARN(("SUPUSBFLT_IOCTL_GET_DEVICE: hDevice is NULL!",
    12281235                        cbInBuffer, sizeof (hDevice), cbOutBuffer, sizeof (*pOut)));
    12291236                Status = STATUS_INVALID_PARAMETER;
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