scsi: lpfc: Terminate string in lpfc_debugfs_nvmeio_trc_write()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 14 Dec 2021 07:05:27 +0000 (10:05 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Jan 2022 11:33:48 +0000 (12:33 +0100)
commit058a534e0af2c5f52671b3ed6735aaeefafa8b57
tree210bc5d8216a59ff3ed51b5721c7328ec0f04525
parent8a2644526ada31d5b6a165649c3220af38a770ee
scsi: lpfc: Terminate string in lpfc_debugfs_nvmeio_trc_write()

[ Upstream commit 9020be114a47bf7ff33e179b3bb0016b91a098e6 ]

The "mybuf" string comes from the user, so we need to ensure that it is NUL
terminated.

Link: https://lore.kernel.org/r/20211214070527.GA27934@kili
Fixes: bd2cdd5e400f ("scsi: lpfc: NVME Initiator: Add debugfs support")
Reviewed-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/lpfc/lpfc_debugfs.c