summaryrefslogtreecommitdiff
path: root/drivers/scsi/qla2xxx/qla_mr.c
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2019-08-09 06:01:55 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2019-08-13 04:34:07 +0300
commitdc6d6d34e1f674b39d91454fca2b826e190e0351 (patch)
treeea7acb98da5b5c89bcafbebb9b0341b1b3ef10f1 /drivers/scsi/qla2xxx/qla_mr.c
parentfcef08932db7770cc176555ac2f08574b1e43af6 (diff)
downloadlinux-dc6d6d34e1f674b39d91454fca2b826e190e0351.tar.xz
scsi: qla2xxx: Check the PCI info string output buffer size
Pass the output buffer size to the code that generates a PCI info string and check the output buffer size while generating a PCI info string. Cc: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Tested-by: Himanshu Madhani <hmadhani@marvell.com> Reviewed-by: Himanshu Madhani <hmadhani@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_mr.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_mr.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/scsi/qla2xxx/qla_mr.c b/drivers/scsi/qla2xxx/qla_mr.c
index 9e3f2f462a2e..759fcfecc310 100644
--- a/drivers/scsi/qla2xxx/qla_mr.c
+++ b/drivers/scsi/qla2xxx/qla_mr.c
@@ -688,14 +688,12 @@ qlafx00_config_rings(struct scsi_qla_host *vha)
}
char *
-qlafx00_pci_info_str(struct scsi_qla_host *vha, char *str)
+qlafx00_pci_info_str(struct scsi_qla_host *vha, char *str, size_t str_len)
{
struct qla_hw_data *ha = vha->hw;
- if (pci_is_pcie(ha->pdev)) {
- strcpy(str, "PCIe iSA");
- return str;
- }
+ if (pci_is_pcie(ha->pdev))
+ strlcpy(str, "PCIe iSA", str_len);
return str;
}