diff options
author | FUJITA Tomonori <tomof@acm.org> | 2008-01-13 02:20:18 +0900 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-01-23 11:29:26 -0600 |
commit | cc75e8ab6f262a3ea60e8d8268f48da5365f2823 (patch) | |
tree | 84be7a959b51f7f3349daead61dba5814155ab24 | |
parent | 3bc8070fb75b33151791fb54ca36ae5abcc8b8df (diff) |
[SCSI] libsas: fix sense_buffer overrun
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
-rw-r--r-- | drivers/scsi/libsas/sas_scsi_host.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c index b784089b18d..828fed1114e 100644 --- a/drivers/scsi/libsas/sas_scsi_host.c +++ b/drivers/scsi/libsas/sas_scsi_host.c @@ -108,7 +108,7 @@ static void sas_scsi_task_done(struct sas_task *task) break; case SAM_CHECK_COND: memcpy(sc->sense_buffer, ts->buf, - max(SCSI_SENSE_BUFFERSIZE, ts->buf_valid_size)); + min(SCSI_SENSE_BUFFERSIZE, ts->buf_valid_size)); stat = SAM_CHECK_COND; break; default: |