diff options
author | Denis Kirjanov <dkirjanov@kernel.org> | 2010-06-07 04:13:57 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-06-07 04:13:57 -0400 |
commit | 3fd7fa4a89f0b85b9b33e922f15a2289c0fb8499 (patch) | |
tree | b945b7fb52aada745b386f12392e86f997c6814d /drivers | |
parent | 9227a46bfbac0516fb7428715a095e1bc59b872a (diff) |
8139too: fix buffer overrun in rtl8139_init_board
Fix rtl_chip_info buffer overrun when we can't identify the chip.
(i = ARRAY_SIZE (rtl_chip_info) in this case)
Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/8139too.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c index 4ba72933f0da..80cd074d3817 100644 --- a/drivers/net/8139too.c +++ b/drivers/net/8139too.c | |||
@@ -860,6 +860,7 @@ retry: | |||
860 | } | 860 | } |
861 | 861 | ||
862 | /* if unknown chip, assume array element #0, original RTL-8139 in this case */ | 862 | /* if unknown chip, assume array element #0, original RTL-8139 in this case */ |
863 | i = 0; | ||
863 | dev_dbg(&pdev->dev, "unknown chip version, assuming RTL-8139\n"); | 864 | dev_dbg(&pdev->dev, "unknown chip version, assuming RTL-8139\n"); |
864 | dev_dbg(&pdev->dev, "TxConfig = 0x%lx\n", RTL_R32 (TxConfig)); | 865 | dev_dbg(&pdev->dev, "TxConfig = 0x%lx\n", RTL_R32 (TxConfig)); |
865 | tp->chipset = 0; | 866 | tp->chipset = 0; |