diff options
author | FUJITA Tomonori <tomof@acm.org> | 2008-01-12 20:20:18 +0300 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-01-23 20:29:26 +0300 |
commit | cc75e8ab6f262a3ea60e8d8268f48da5365f2823 (patch) | |
tree | 84be7a959b51f7f3349daead61dba5814155ab24 /drivers/scsi | |
parent | 3bc8070fb75b33151791fb54ca36ae5abcc8b8df (diff) | |
download | linux-cc75e8ab6f262a3ea60e8d8268f48da5365f2823.tar.xz |
[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>
Diffstat (limited to 'drivers/scsi')
-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 b784089b18d0..828fed1114ee 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: |