Wasn't checking the range of the device id in cdio_have_driver. Add regression test for checking this too.
More git administrivia.
This commit is contained in:
@@ -857,6 +857,9 @@ cdio_have_atapi(CdIo_t *p_cdio)
|
||||
bool
|
||||
cdio_have_driver(driver_id_t driver_id)
|
||||
{
|
||||
if (driver_id < CDIO_MIN_DRIVER ||
|
||||
driver_id > CDIO_MAX_DRIVER)
|
||||
return false;
|
||||
return (*CdIo_all_drivers[driver_id].have_driver)();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user