diff --git a/src/scsi/scsi_cdrom.c b/src/scsi/scsi_cdrom.c index e099efe07..842b8cc28 100644 --- a/src/scsi/scsi_cdrom.c +++ b/src/scsi/scsi_cdrom.c @@ -1635,6 +1635,10 @@ scsi_cdrom_command(scsi_common_t *sc, uint8_t *cdb) /* If all the flag bits are cleared, then treat it as a non-data command. */ if ((cdb[9] == 0x00) && ((cdb[10] & 0x07) == 0x00)) dev->sector_len = 0; + else if ((cdb[9] == 0x00) && ((cdb[10] & 0x07) != 0x00)) { + scsi_cdrom_invalid_field(dev); + break; + } break; case GPCMD_READ_CD_OLD: case GPCMD_READ_CD: @@ -1653,6 +1657,10 @@ scsi_cdrom_command(scsi_common_t *sc, uint8_t *cdb) /* If all the flag bits are cleared, then treat it as a non-data command. */ if ((cdb[9] == 0x00) && ((cdb[10] & 0x07) == 0x00)) dev->sector_len = 0; + else if ((cdb[9] == 0x00) && ((cdb[10] & 0x07) != 0x00)) { + scsi_cdrom_invalid_field(dev); + break; + } break; }