Author: fireball
Date: Sun Sep 28 06:05:18 2008
New Revision: 36572
URL:
http://svn.reactos.org/svn/reactos?rev=36572&view=rev
Log:
- Ports are counted starting from 1, with 0 being an invalid port index. Remove memory
corruption by actually allocating MAX_ROOT_PORTS + 1 sized array. Fixes Coverity CID:
601.
Modified:
trunk/reactos/drivers/usb/nt4compat/usbdriver/hub.h
Modified: trunk/reactos/drivers/usb/nt4compat/usbdriver/hub.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/nt4compat/usbd…
==============================================================================
--- trunk/reactos/drivers/usb/nt4compat/usbdriver/hub.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/nt4compat/usbdriver/hub.h [iso-8859-1] Sun Sep 28 06:05:18
2008
@@ -208,7 +208,7 @@
USB_HUB_STATUS hub_status;
USB_PORT_STATUS port_status; //working data buf for get port feature
- USB_PORT_STATUS rh_port_status[ EHCI_MAX_ROOT_PORTS ]; //working buf for get rh
ports feature
+ USB_PORT_STATUS rh_port_status[ EHCI_MAX_ROOT_PORTS + 1 ]; //working buf for get rh
ports feature
UCHAR multiple_tt; // boolean
ULONG tt_status_map[ 4 ]; // bit map to indicate the indexed tt's periodic
buffer busy or not