summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorMatthew Dempsky <matthew@cvs.openbsd.org>2011-04-08 19:17:16 +0000
committerMatthew Dempsky <matthew@cvs.openbsd.org>2011-04-08 19:17:16 +0000
commit4205b80e29d7f8922ac23d5a5b193e50f4ed2f94 (patch)
tree51f74158fae8b528db7c2d128bbd2db05fb19368 /sys/net
parent9cb8d98e16b8554b3786e16f7d9be2307bdf8510 (diff)
Fix a 64-bit arithmetic bug I stumbled upon while investigating our
handling of recursive IPComp payloads. (This code is way old and may go away soon in favor of using sys/lib/libz, but committing anyway as plans aren't finalized yet.) ok deraadt@
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/zlib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/zlib.c b/sys/net/zlib.c
index 6d2a95084a9..70b58c230b1 100644
--- a/sys/net/zlib.c
+++ b/sys/net/zlib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: zlib.c,v 1.13 2007/11/26 09:28:33 martynas Exp $ */
+/* $OpenBSD: zlib.c,v 1.14 2011/04/08 19:17:15 matthew Exp $ */
/* $NetBSD: zlib.c,v 1.2 1996/03/16 23:55:40 christos Exp $ */
/*
@@ -3335,7 +3335,7 @@ int r;
break;
case LENS:
NEEDBITS(32)
- if (((~b) >> 16) != (b & 0xffff))
+ if ((((~b) >> 16) & 0xffff) != (b & 0xffff))
{
s->mode = BADB;
z->msg = "invalid stored block lengths";