diff options
author | Thorsten Lockert <tholo@cvs.openbsd.org> | 1997-04-30 05:56:07 +0000 |
---|---|---|
committer | Thorsten Lockert <tholo@cvs.openbsd.org> | 1997-04-30 05:56:07 +0000 |
commit | 0dd9870ecb1afa43b7a8e544cc5557035d6e8f93 (patch) | |
tree | 9bb1b7b7332428b7cb78644ddb5eedcc72c1503b /lib | |
parent | 431efa89f66876af0562bdcf691e84d2be897f82 (diff) |
Make possible truncation of long value more explicit
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/md/md4c.c | 4 | ||||
-rw-r--r-- | lib/libc/md/md5c.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/libc/md/md4c.c b/lib/libc/md/md4c.c index f182d518649..f85d41cc6c3 100644 --- a/lib/libc/md/md4c.c +++ b/lib/libc/md/md4c.c @@ -22,7 +22,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: md4c.c,v 1.8 1997/01/07 10:09:00 niklas Exp $"; +static char rcsid[] = "$OpenBSD: md4c.c,v 1.9 1997/04/30 05:56:05 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <string.h> @@ -193,7 +193,7 @@ MD4_CTX *context; /* context */ /* Save number of bits */ hi = context->count >> 32; - lo = context->count & 0xffffffff; + lo = (u_int32_t)context->count & 0xffffffff; Encode (bits, &lo, 4); Encode (bits + 4, &hi, 4); diff --git a/lib/libc/md/md5c.c b/lib/libc/md/md5c.c index f8ec90d6a55..672c45afffc 100644 --- a/lib/libc/md/md5c.c +++ b/lib/libc/md/md5c.c @@ -23,7 +23,7 @@ documentation and/or software. */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: md5c.c,v 1.8 1997/01/07 10:09:00 niklas Exp $"; +static char rcsid[] = "$OpenBSD: md5c.c,v 1.9 1997/04/30 05:56:06 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <string.h> @@ -205,7 +205,7 @@ MD5_CTX *context; /* context */ /* Save number of bits */ hi = context->count >> 32; - lo = context->count & 0xffffffff; + lo = (u_int32_t)context->count & 0xffffffff; Encode (bits, &lo, 4); Encode (bits + 4, &hi, 4); |