Commit cc75e8ab authored by FUJITA Tomonori's avatar FUJITA Tomonori Committed by James Bottomley

[SCSI] libsas: fix sense_buffer overrun

Signed-off-by: default avatarFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent 3bc8070f
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment