OSDN Git Service

scsi: ufs: Fix potential NULL pointer access during memcpy
authorBean Huo <beanhuo@micron.com>
Wed, 3 Jun 2020 09:19:57 +0000 (11:19 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 16 Jun 2020 03:17:47 +0000 (23:17 -0400)
commitcbe193f6f093b79fd1ab998dd95f73f874fb4733
tree0e7fd8243ee96568e7fa061e9325e07cb9837621
parentc4607a09450d672a78735de14f0108204491f49a
scsi: ufs: Fix potential NULL pointer access during memcpy

If param_offset is not 0, the memcpy length shouldn't be the true
descriptor length.

Link: https://lore.kernel.org/r/20200603091959.27618-4-huobean@gmail.com
Acked-by: Avri Altman <avri.altman@wdc.com>
Signed-off-by: Bean Huo <beanhuo@micron.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ufs/ufshcd.c