summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1996-05-02 06:30:27 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1996-05-02 06:30:27 +0000
commit357d854e83a35ee1bdb134546c9f0e8b086a8833 (patch)
treee7c174439dee53b570a9ad4da24b3ebe9c977ba7 /sys/arch
parent8d7ca6362d23cfb11b115f75fcdb9a7f6e782bd9 (diff)
Check (once again) the packet length against MCLBYTES always.
MCLBYTES has recently been raised to >ETHER_MAX_LEN so that is not a problem anymore. The former code could result in memory corruption.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/amiga/isa/if_isaed.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/arch/amiga/isa/if_isaed.c b/sys/arch/amiga/isa/if_isaed.c
index 8596e301531..7302b5dbdcb 100644
--- a/sys/arch/amiga/isa/if_isaed.c
+++ b/sys/arch/amiga/isa/if_isaed.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_isaed.c,v 1.3 1996/04/27 18:39:00 niklas Exp $ */
+/* $OpenBSD: if_isaed.c,v 1.4 1996/05/02 06:30:26 niklas Exp $ */
/*
* Device driver for National Semiconductor DS8390/WD83C690 based ethernet
@@ -1896,8 +1896,7 @@ loop:
* mbuf cluster or less; the upper layer protocols can then
* figure out the length from their own length field(s).
*/
- if (len <= (MCLBYTES > ETHER_MAX_LEN ? MCLBYTES :
- ETHER_MAX_LEN) &&
+ if (len <= MCLBYTES &&
packet_hdr.next_packet >= sc->rec_page_start &&
packet_hdr.next_packet < sc->rec_page_stop) {
/* Go get packet. */