mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-05 22:28:00 +00:00
scsi: qedi: Use snprintf instead of sprintf
Use snprintf to limit max number of bytes to the buffer. Link: https://lore.kernel.org/r/20200908095657.26821-6-mrangankar@marvell.com Signed-off-by: Manish Rangankar <mrangankar@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
c0650e2844
commit
5a2e69af16
1 changed files with 1 additions and 1 deletions
|
@ -2537,7 +2537,7 @@ static int __qedi_probe(struct pci_dev *pdev, int mode)
|
|||
QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_DISC, "MAC address is %pM.\n",
|
||||
qedi->mac);
|
||||
|
||||
sprintf(host_buf, "host_%d", qedi->shost->host_no);
|
||||
snprintf(host_buf, sizeof(host_buf), "host_%d", qedi->shost->host_no);
|
||||
qedi_ops->common->set_name(qedi->cdev, host_buf);
|
||||
|
||||
qedi_ops->register_ops(qedi->cdev, &qedi_cb_ops, qedi);
|
||||
|
|
Loading…
Add table
Reference in a new issue