From: Christian Hoff Date: Thu, 14 Jun 2012 13:55:25 +0000 (+0200) Subject: scsi: Fix data length == SCSI_SENSE_BUF_SIZE X-Git-Tag: v1.2.0-rc0~191^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=335f560f9c7b63ede973d7b9712438f39ee2df61;p=thirdparty%2Fqemu.git scsi: Fix data length == SCSI_SENSE_BUF_SIZE Fix the edge case where the sense data length is exactly the same as SCSI_SENSE_BUF_SIZE. This makes SCSI requests work that use all of the available 95 byte sense data. Signed-off-by: Christian Hoff Signed-off-by: Christian Borntraeger Signed-off-by: Paolo Bonzini --- diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c index 14e2f730b82..4e95eee55b4 100644 --- a/hw/scsi-bus.c +++ b/hw/scsi-bus.c @@ -1389,7 +1389,7 @@ void scsi_req_complete(SCSIRequest *req, int status) assert(req->status == -1); req->status = status; - assert(req->sense_len < sizeof(req->sense)); + assert(req->sense_len <= sizeof(req->sense)); if (status == GOOD) { req->sense_len = 0; }