diff options
author | 1996-05-02 06:30:26 +0000 | |
---|---|---|
committer | 1996-05-02 06:30:26 +0000 | |
commit | f64971306541032f52e130ca14c065fabef49667 (patch) | |
tree | 27b4258fbe6b29533a3d3caf8ee0aacdfff5974d | |
parent | sync with netbsd (diff) | |
download | wireguard-openbsd-f64971306541032f52e130ca14c065fabef49667.tar.xz wireguard-openbsd-f64971306541032f52e130ca14c065fabef49667.zip |
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.
-rw-r--r-- | sys/arch/amiga/isa/if_isaed.c | 5 |
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. */ |