From e997985326bb87e521e0a20fb420481d7d949c00 Mon Sep 17 00:00:00 2001 From: SarahW Date: Sun, 9 Feb 2020 13:01:37 +0000 Subject: [PATCH] Add additional guards in scsi_hd.c. Patch from EluanCM. --- src/scsi_hd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/scsi_hd.c b/src/scsi_hd.c index 914f984..2a064d5 100644 --- a/src/scsi_hd.c +++ b/src/scsi_hd.c @@ -414,7 +414,9 @@ static int scsi_hd_command(uint8_t *cdb, void *p) } for (; len >= 0; len--) + { add_data_len(0); + } len = data->data_pos_write; if (cdb[0] == SCSI_MODE_SENSE_6)