提交 5e33b719 编写于 作者: R roel kluin 提交者: David S. Miller

pcnet32: Read buffer overflow

An `options[cards_found]' that equals `sizeof(options_mapping)' is already beyond
the array.
Signed-off-by: NRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 418372b0
...@@ -1839,7 +1839,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev) ...@@ -1839,7 +1839,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
lp->chip_version = chip_version; lp->chip_version = chip_version;
lp->msg_enable = pcnet32_debug; lp->msg_enable = pcnet32_debug;
if ((cards_found >= MAX_UNITS) if ((cards_found >= MAX_UNITS)
|| (options[cards_found] > sizeof(options_mapping))) || (options[cards_found] >= sizeof(options_mapping)))
lp->options = PCNET32_PORT_ASEL; lp->options = PCNET32_PORT_ASEL;
else else
lp->options = options_mapping[options[cards_found]]; lp->options = options_mapping[options[cards_found]];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册