From: Christian Hoff <christian.h...@de.ibm.com> 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 <christian.h...@de.ibm.com> Signed-off-by: Christian Borntraeger <borntrae...@de.ibm.com> --- hw/scsi-bus.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c index 64e709e..d1779a2 100644 --- a/hw/scsi-bus.c +++ b/hw/scsi-bus.c @@ -1295,7 +1295,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; } -- 1.7.0.4