summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorroel kluin <roel.kluin@gmail.com>2009-08-07 03:24:27 +0000
committerDavid S. Miller <davem@davemloft.net>2009-08-09 21:45:48 -0700
commit5e33b719c8fcccfedc1d25167826a0f93fe6c5a1 (patch)
tree17fe28222553c42ea7b5627e0aaf9749634b83ec /drivers
parent418372b0ab7a3bbcc59d71e8e4d322ef18263dab (diff)
downloadop-kernel-dev-5e33b719c8fcccfedc1d25167826a0f93fe6c5a1.zip
op-kernel-dev-5e33b719c8fcccfedc1d25167826a0f93fe6c5a1.tar.gz
pcnet32: Read buffer overflow
An `options[cards_found]' that equals `sizeof(options_mapping)' is already beyond the array. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/pcnet32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c
index a646a44..23e1a07 100644
--- a/drivers/net/pcnet32.c
+++ b/drivers/net/pcnet32.c
@@ -1839,7 +1839,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
lp->chip_version = chip_version;
lp->msg_enable = pcnet32_debug;
if ((cards_found >= MAX_UNITS)
- || (options[cards_found] > sizeof(options_mapping)))
+ || (options[cards_found] >= sizeof(options_mapping)))
lp->options = PCNET32_PORT_ASEL;
else
lp->options = options_mapping[options[cards_found]];
OpenPOWER on IntegriCloud