During enumeration, obtaining the port number via SPDRP_ADDRESS might
return a bogus value for some third-party HCD drivers. If this occurs,
we might end up reporting the device as having the VID/PID from the last
successful enumeration. Guard against this particular situation by
clearing the USB_NODE_CONNECTION_INFORMATION_EX structure before issuing
the DeviceIoControl() call.
References #403
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
return LIBUSB_ERROR_ACCESS;
}
+ memset(&conn_info, 0, sizeof(conn_info));
conn_info.ConnectionIndex = (ULONG)port_number;
// coverity[tainted_data_argument]
if (!DeviceIoControl(hub_handle, IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX, &conn_info, sizeof(conn_info),
-#define LIBUSB_NANO 11305
+#define LIBUSB_NANO 11306