]> git.baikalelectronics.ru Git - kernel.git/commit
enc28j60: fix RX buffer overflow
authorBaruch Siach <baruch@tkos.co.il>
Mon, 5 Jan 2009 00:23:01 +0000 (16:23 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 Jan 2009 00:23:01 +0000 (16:23 -0800)
commitb8dc8f78957b7bb1df2edacf97d2f17c3b0d6410
treeb75537b4c063a28226d1810d0209b30375613eec
parent8cec6902019ae09cd75634f4957e92f25f1b15fc
enc28j60: fix RX buffer overflow

The enc28j60 driver doesn't check whether the length of the packet as reported
by the hardware fits into the preallocated buffer. When stressed, the hardware
may report insanely large packets even tough the "Receive OK" bit is set. Fix
this.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/enc28j60.c