Message ID | 20181220170805.17802-1-colin.king@canonical.com (mailing list archive) |
---|---|
State | Deferred |
Headers | show |
Series | [next] scsi: lpfc: replace snprintf with strscpy | expand |
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index b4f1a840b3b4..7b0cce3b42ed 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c @@ -4540,7 +4540,7 @@ lpfc_info(struct Scsi_Host *host) memset(lpfcinfobuf, 0, sizeof(lpfcinfobuf)); if (phba && phba->pcidev){ /* Model Description */ - scnprintf(tmp, sizeof(tmp), phba->ModelDesc); + strscpy(tmp, phba->ModelDesc, sizeof(tmp)); if (strlcat(lpfcinfobuf, tmp, sizeof(lpfcinfobuf)) >= sizeof(lpfcinfobuf)) goto buffer_done;