Commit e26511f6 authored by Michael Straube's avatar Michael Straube Committed by Greg Kroah-Hartman

staging: vme_user: prefer strscpy over strcpy

Using strcpy has potential for buffer overflows. It should be replaced
with strscpy where possible. In this case the return value of strcpy is
not used, so we can safely replace it with strscpy.
Signed-off-by: default avatarMichael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20231023090001.7273-1-straube.linux@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5e3441eb
......@@ -2310,7 +2310,7 @@ static int tsi148_probe(struct pci_dev *pdev, const struct pci_device_id *id)
mutex_init(&tsi148_device->vme_rmw);
tsi148_bridge->parent = &pdev->dev;
strcpy(tsi148_bridge->name, driver_name);
strscpy(tsi148_bridge->name, driver_name, VMENAMSIZ);
/* Setup IRQ */
retval = tsi148_irq_init(tsi148_bridge);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment