diff options
author | Auke Kok <auke\-jan.h.kok@intel.com> | 2006-09-27 15:53:17 -0400 |
---|---|---|
committer | Auke Kok <juke-jan.h.kok@intel.com> | 2006-09-27 15:53:17 -0400 |
commit | 0eb5a34cdf34ad07b6db2df1e523aaf6574601b4 (patch) | |
tree | 75d2086eb9601bb2374b0d7575b12484ed189748 /drivers/net/ixgb/ixgb_main.c | |
parent | 0abb6eb12806cf99ea815810d470423083c3b9f4 (diff) |
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/ixgb/ixgb_main.c')
-rw-r--r-- | drivers/net/ixgb/ixgb_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c index a88c2b8b66b1..fb4c1ad745b2 100644 --- a/drivers/net/ixgb/ixgb_main.c +++ b/drivers/net/ixgb/ixgb_main.c | |||
@@ -437,7 +437,7 @@ ixgb_probe(struct pci_dev *pdev, | |||
437 | netdev->poll_controller = ixgb_netpoll; | 437 | netdev->poll_controller = ixgb_netpoll; |
438 | #endif | 438 | #endif |
439 | 439 | ||
440 | strcpy(netdev->name, pci_name(pdev)); | 440 | strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1); |
441 | netdev->mem_start = mmio_start; | 441 | netdev->mem_start = mmio_start; |
442 | netdev->mem_end = mmio_start + mmio_len; | 442 | netdev->mem_end = mmio_start + mmio_len; |
443 | netdev->base_addr = adapter->hw.io_base; | 443 | netdev->base_addr = adapter->hw.io_base; |