diff options
author | roel kluin <roel.kluin@gmail.com> | 2009-08-07 05:24:27 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-08-10 06:45:48 +0200 |
commit | 5e33b719c8fcccfedc1d25167826a0f93fe6c5a1 (patch) | |
tree | 17fe28222553c42ea7b5627e0aaf9749634b83ec /drivers/net/pcnet32.c | |
parent | sctp: fix missing destroy of percpu counter variable in sctp_proc_exit() (diff) | |
download | linux-5e33b719c8fcccfedc1d25167826a0f93fe6c5a1.tar.xz linux-5e33b719c8fcccfedc1d25167826a0f93fe6c5a1.zip |
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/net/pcnet32.c')
-rw-r--r-- | drivers/net/pcnet32.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c index a646a445fda9..23e1a0750fe0 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]]; |