]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: qedf: remove memset/memcpy to nfunc and use func instead
authorColin Ian King <colin.king@canonical.com>
Fri, 12 Apr 2019 09:48:29 +0000 (10:48 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 19 Apr 2019 00:32:26 +0000 (20:32 -0400)
commit0a1b1fc0479406c5e1ac01b4b26201619adab0ee
tree766f782a7a226c3aa515a27c8830b87db50b769f
parent0e5a09fed91b9bdbb586ed3b5310d590b16ddc22
scsi: qedf: remove memset/memcpy to nfunc and use func instead

Currently the qedf_dbg_* family of functions can overrun the end of the
source string if it is less than the destination buffer length because of
the use of a fixed sized memcpy. Remove the memset/memcpy calls to nfunc
and just use func instead as it is always a null terminated string.

Addresses-Coverity: ("Out-of-bounds access")
Fixes: 00517e291437 ("scsi: qedf: Add QLogic FastLinQ offload FCoE driver framework.")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qedf/qedf_dbg.c