Added a sanity check to the Iomega ZIP code.

This commit is contained in:
OBattler
2020-01-14 21:05:15 +01:00
parent f8222dc780
commit a502e44f17

View File

@@ -1173,7 +1173,8 @@ zip_blocks(zip_t *dev, int32_t *len, int first_batch, int out)
*len = dev->requested_blocks << 9;
for (i = 0; i < dev->requested_blocks; i++) {
fseek(dev->drv->f, dev->drv->base + (dev->sector_pos << 9) + (i << 9), SEEK_SET);
if (fseek(dev->drv->f, dev->drv->base + (dev->sector_pos << 9) + (i << 9), SEEK_SET) == 1)
break;
if (feof(dev->drv->f))
break;