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)
commit22692018b93f0782cda5a843cecfffda1854eb8d
treeb75537b4c063a28226d1810d0209b30375613eec
parentfecc7036e73a71231045e03ff524b5f8bd892a84
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