[USBPORT] Fixing calculation pointer for FdoExtension->Usb2Extension.
authorVadim Galyant <vgal@rambler.ru>
Mon, 25 Dec 2017 06:19:43 +0000 (15:19 +0900)
committerAmine Khaldi <amine.khaldi@reactos.org>
Sun, 21 Jan 2018 18:35:56 +0000 (19:35 +0100)
drivers/usb/usbport/usbport.c

index 1dbe779..3be8e95 100644 (file)
@@ -1907,8 +1907,8 @@ USBPORT_AddDevice(IN PDRIVER_OBJECT DriverObject,
     if (MiniPortInterface->Packet.MiniPortFlags & USB_MINIPORT_FLAGS_USB2)
     {
         FdoExtension->Usb2Extension =
-        (PUSB2_HC_EXTENSION)FdoExtension->MiniPortExt +
-                            MiniPortInterface->Packet.MiniPortExtensionSize;
+        (PUSB2_HC_EXTENSION)((ULONG_PTR)FdoExtension->MiniPortExt +
+                             MiniPortInterface->Packet.MiniPortExtensionSize);
 
         DPRINT("USBPORT_AddDevice: Usb2Extension - %p\n",
                FdoExtension->Usb2Extension);