Fixed potential SCSI ID overruns in the SCSI hard diks, CD-ROM, and Iomega ZIP codes.
This commit is contained in:
@@ -2368,7 +2368,7 @@ zip_hard_reset(void)
|
||||
zip_log("ZIP hard_reset drive=%d\n", c);
|
||||
|
||||
/* Make sure to ignore any SCSI ZIP drive that has an out of range ID. */
|
||||
if ((zip_drives[c].bus_type == ZIP_BUS_SCSI) && (zip_drives[c].scsi_device_id > SCSI_ID_MAX))
|
||||
if ((zip_drives[c].bus_type == ZIP_BUS_SCSI) && (zip_drives[c].scsi_device_id >= SCSI_ID_MAX))
|
||||
continue;
|
||||
|
||||
/* Make sure to ignore any ATAPI ZIP drive that has an out of range IDE channel. */
|
||||
|
@@ -2545,7 +2545,7 @@ scsi_cdrom_drive_reset(int c)
|
||||
ide_t *id;
|
||||
|
||||
/* Make sure to ignore any SCSI CD-ROM drive that has an out of range ID. */
|
||||
if ((drv->bus_type == CDROM_BUS_SCSI) && (drv->scsi_device_id > SCSI_ID_MAX))
|
||||
if ((drv->bus_type == CDROM_BUS_SCSI) && (drv->scsi_device_id >= SCSI_ID_MAX))
|
||||
return;
|
||||
|
||||
/* Make sure to ignore any ATAPI CD-ROM drive that has an out of range IDE channel. */
|
||||
|
@@ -1212,7 +1212,7 @@ scsi_disk_hard_reset(void)
|
||||
scsi_disk_log("SCSI disk hard_reset drive=%d\n", c);
|
||||
|
||||
/* Make sure to ignore any SCSI disk that has an out of range ID. */
|
||||
if (hdd[c].scsi_id > SCSI_ID_MAX)
|
||||
if (hdd[c].scsi_id >= SCSI_ID_MAX)
|
||||
continue;
|
||||
|
||||
/* Make sure to ignore any SCSI disk whose image file name is empty. */
|
||||
|
Reference in New Issue
Block a user