diff options
author | Auke Kok <auke\-jan.h.kok@intel.com> | 2006-09-27 12:53:17 -0700 |
---|---|---|
committer | Auke Kok <juke-jan.h.kok@intel.com> | 2006-09-27 12:53:17 -0700 |
commit | 0eb5a34cdf34ad07b6db2df1e523aaf6574601b4 (patch) | |
tree | 75d2086eb9601bb2374b0d7575b12484ed189748 /drivers/net/e100.c | |
parent | 0abb6eb12806cf99ea815810d470423083c3b9f4 (diff) | |
download | blackbird-op-linux-0eb5a34cdf34ad07b6db2df1e523aaf6574601b4.tar.gz blackbird-op-linux-0eb5a34cdf34ad07b6db2df1e523aaf6574601b4.zip |
e100, e1000, ixgb: Fix an impossible memory overwrite bug
We keep getting requests from people that think that this might be
an exploitable hole where we would overwrite 4 bytes in the netdev
struct if the pci name would exceed 15 characters. In reality this
will never happen but we fix it anyway.
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Diffstat (limited to 'drivers/net/e100.c')
-rw-r--r-- | drivers/net/e100.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/e100.c b/drivers/net/e100.c index d9750e269a56..ab0868cb120c 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c @@ -2572,7 +2572,7 @@ static int __devinit e100_probe(struct pci_dev *pdev, #ifdef CONFIG_NET_POLL_CONTROLLER netdev->poll_controller = e100_netpoll; #endif - strcpy(netdev->name, pci_name(pdev)); + strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1); nic = netdev_priv(netdev); nic->netdev = netdev; |