diff options
Diffstat (limited to 'lib/libc/md/md4c.c')
-rw-r--r-- | lib/libc/md/md4c.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/libc/md/md4c.c b/lib/libc/md/md4c.c index 65dee105993..f182d518649 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.7 1997/01/06 00:18:22 niklas Exp $"; +static char rcsid[] = "$OpenBSD: md4c.c,v 1.8 1997/01/07 10:09:00 niklas Exp $"; #endif /* LIBC_SCCS and not lint */ #include <string.h> @@ -189,10 +189,13 @@ MD4_CTX *context; /* context */ { unsigned char bits[8]; unsigned int index, padLen; + u_int32_t hi, lo; /* Save number of bits */ - Encode (bits, ((void *)&context->count) + 4, 4); - Encode (bits + 4, &context->count, 4); + hi = context->count >> 32; + lo = context->count & 0xffffffff; + Encode (bits, &lo, 4); + Encode (bits + 4, &hi, 4); /* Pad out to 56 mod 64. */ |