Commit 3fd7fa4a authored by Denis Kirjanov's avatar Denis Kirjanov Committed by David S. Miller

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: default avatarDenis Kirjanov <dkirjanov@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9227a46b
......@@ -860,6 +860,7 @@ static __devinit struct net_device * rtl8139_init_board (struct pci_dev *pdev)
}
/* if unknown chip, assume array element #0, original RTL-8139 in this case */
i = 0;
dev_dbg(&pdev->dev, "unknown chip version, assuming RTL-8139\n");
dev_dbg(&pdev->dev, "TxConfig = 0x%lx\n", RTL_R32 (TxConfig));
tp->chipset = 0;
......
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