diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-10-26 01:18:11 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-10-26 01:18:11 +0000 |
commit | 046588a3f5676450b42ab21bbc94009df885357f (patch) | |
tree | 834c1c8ad6f491a6efeba709325342eaa07bc13a /sys/arch/hp300/stand | |
parent | c90daa1186258d136f2f45d20dbf698b4daee12c (diff) |
update from netbsd tree
Diffstat (limited to 'sys/arch/hp300/stand')
-rw-r--r-- | sys/arch/hp300/stand/if_le.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sys/arch/hp300/stand/if_le.c b/sys/arch/hp300/stand/if_le.c index 26ed93fd473..24983328460 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.6.2.1 1995/10/19 20:42:41 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; |