From e0578fbf5baeb71732b5f719b4d46652d44d0387 Mon Sep 17 00:00:00 2001 From: OBattler Date: Mon, 10 Jan 2022 20:26:36 +0100 Subject: [PATCH] And another fix. --- src/scsi/scsi_cdrom.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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; }