]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: lpfc: Fix sprintf() overflow in lpfc_display_fpin_wwpn()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 16 Sep 2021 13:22:51 +0000 (16:22 +0300)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 22 Sep 2021 04:14:34 +0000 (00:14 -0400)
commitc583e77001446f7459b07c50ba374184a219ea00
treee0e8823594426015dcf88de93b016f480d7d32d3
parentefdad53ecedbc6f4a7e19fca8265c35ab2fb38e7
scsi: lpfc: Fix sprintf() overflow in lpfc_display_fpin_wwpn()

This scnprintf() uses the wrong limit.  It should be
"LPFC_FPIN_WWPN_LINE_SZ - len" instead of LPFC_FPIN_WWPN_LINE_SZ.

Link: https://lore.kernel.org/r/20210916132251.GD25094@kili
Fixes: 4715791ca276 ("scsi: lpfc: Expand FPIN and RDF receive logging")
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>
drivers/scsi/lpfc/lpfc_els.c