From: Denis Kirjanov Date: Mon, 7 Jun 2010 08:13:57 +0000 (-0700) Subject: 8139too: fix buffer overrun in rtl8139_init_board X-Git-Tag: MMI-PSA29.97-13-9~23139^2~126 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3fd7fa4a89f0b85b9b33e922f15a2289c0fb8499;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Signed-off-by: David S. Miller --- 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: } /* 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;