]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
commit65b1dc99008de592f7c1c8e5fad446824791b4da
tree766f782a7a226c3aa515a27c8830b87db50b769f
parent948e922fc44611ee2de0c89583ca958cb5307d36
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: 61d8658b4a43 ("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