From 24430aea8925f3615f9f7e6339cd7485b7edee94 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Sun, 28 Sep 2008 11:05:18 +0000 Subject: [PATCH] - 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. svn path=/trunk/; revision=36572 --- reactos/drivers/usb/nt4compat/usbdriver/hub.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/drivers/usb/nt4compat/usbdriver/hub.h b/reactos/drivers/usb/nt4compat/usbdriver/hub.h index 91447c99111..940d401bfac 100644 --- a/reactos/drivers/usb/nt4compat/usbdriver/hub.h +++ b/reactos/drivers/usb/nt4compat/usbdriver/hub.h @@ -208,7 +208,7 @@ typedef struct _HUB2_EXTENSION 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