ADL: Add sanity check to track/sector numbers read from NIB

This commit is contained in:
Walter van Niftrik 2018-01-27 23:12:10 +01:00
parent b64d8dbf3b
commit 9f479c9b17

View File

@ -150,6 +150,12 @@ static Common::SeekableReadStream *readImage_NIB(const Common::String &filename,
continue;
}
if (track >= 35 || sector >= sectorsPerTrack) {
warning("NIB: sector out of bounds @ (%x, %x)", track, sector);
sawAddress = false;
continue;
}
if (!firstGoodTrackPos)
firstGoodTrackPos = pos;