]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - drivers/net/ethernet/dec/tulip/dmfe.c
sweep the floors and convert some .get_drvinfo routines to strlcpy
[mirror_ubuntu-jammy-kernel.git] / drivers / net / ethernet / dec / tulip / dmfe.c
index 17b11ee1745a3795fb2da04a928ebbdfb19357c5..51f7542eb451a048f851ae1979565008d1840b47 100644 (file)
@@ -1085,10 +1085,11 @@ static void dmfe_ethtool_get_drvinfo(struct net_device *dev,
 {
        struct dmfe_board_info *np = netdev_priv(dev);
 
-       strcpy(info->driver, DRV_NAME);
-       strcpy(info->version, DRV_VERSION);
+       strlcpy(info->driver, DRV_NAME, sizeof(info->driver));
+       strlcpy(info->version, DRV_VERSION, sizeof(info->version));
        if (np->pdev)
-               strcpy(info->bus_info, pci_name(np->pdev));
+               strlcpy(info->bus_info, pci_name(np->pdev),
+                       sizeof(info->bus_info));
        else
                sprintf(info->bus_info, "EISA 0x%lx %d",
                        dev->base_addr, dev->irq);