diff --git a/sys/arch/hp300/stand/if_le.c b/sys/arch/hp300/stand/if_le.c index 26ed93fd473f..12cea60a0ef5 100644 --- a/sys/arch/hp300/stand/if_le.c +++ b/sys/arch/hp300/stand/if_le.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_le.c,v 1.6 1995/09/02 05:04:18 thorpej Exp $ */ +/* $NetBSD: if_le.c,v 1.7 1995/10/19 18:43:27 thorpej Exp $ */ /* * Copyright (c) 1993 Adam Glass @@ -501,8 +501,18 @@ le_poll(desc, pkt, len) if (!length) goto cleanup; length -= 4; - if (length > 0) + + if (length > 0) { + /* + * If the length of the packet is greater than the size of the + * buffer, we have to truncate it, to avoid Bad Things. + * XXX Is this the right thing to do? + */ + if (length > len) + length = len; + bcopy(sc->sc_rbuf + (BUFSIZE * sc->sc_next_rd), pkt, length); + } cleanup: cdm->mcnt = 0;