Updated/Removed CD-ROM size checks (#315)

This commit is contained in:
Uwe Seimet 2021-10-08 23:59:23 +02:00 committed by GitHub
parent f5a6f5dce2
commit dd5cad616f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -466,12 +466,9 @@ void SCSICD::OpenPhysical(const Filepath& path)
// Close
fio.Close();
// Size must be a multiple of 2048 and less than 700MB
if (size & 0x7ff) {
throw io_exception("CD-ROM file size must be a multiple of 2048 bytes");
}
if (size > 0x2bed5000) {
throw io_exception("CD-ROM file size must not exceed 700 MB");
// Size must be a multiple of 512
if (size & 0x1ff) {
throw io_exception("CD-ROM file size must be a multiple of 512 bytes");
}
// Set the number of blocks