radeon_hd: Exit on GPIO pin space exhaustion
* Prevents negative array index read * CID 1210885
This commit is contained in:
@@ -309,8 +309,10 @@ gpio_general_populate()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (gpioIndex < 0)
|
if (gpioIndex < 0) {
|
||||||
ERROR("%s: ERROR: Out of space for additional GPIO pins!\n", __func__);
|
ERROR("%s: ERROR: Out of space for additional GPIO pins!\n", __func__);
|
||||||
|
return B_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
ATOM_GPIO_PIN_ASSIGNMENT* pin = gpioInfo->asGPIO_Pin;
|
ATOM_GPIO_PIN_ASSIGNMENT* pin = gpioInfo->asGPIO_Pin;
|
||||||
for (int i = 0; i < numIndices; i++) {
|
for (int i = 0; i < numIndices; i++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user