Fixed a wrong index that could cause crashes with devices containing generic descriptors
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19969 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
9dbe170a69
commit
e40b5c0d59
@ -128,7 +128,7 @@ BusManager::AllocateDevice(Hub *parent, usb_speed speed)
|
||||
ControlPipe *defaultPipe = _GetDefaultPipe(speed);
|
||||
|
||||
if (!defaultPipe) {
|
||||
TRACE(("USB BusManager: error getting the default pipe for speed %d\n", (int)speed));
|
||||
TRACE_ERROR(("USB BusManager: error getting the default pipe for speed %d\n", (int)speed));
|
||||
FreeAddress(deviceAddress);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -191,7 +191,7 @@ Device::Device(Object *parent, usb_device_descriptor &desc, int8 deviceAddress,
|
||||
* sizeof(usb_descriptor *));
|
||||
|
||||
/* add this descriptor */
|
||||
currentInterface->generic[currentInterface->generic_count] =
|
||||
currentInterface->generic[currentInterface->generic_count - 1] =
|
||||
(usb_descriptor *)genericDescriptor;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user