|
|
b9ba6d |
diff -Nrup a/crypt/md5.c b/crypt/md5.c
|
|
|
b9ba6d |
--- a/crypt/md5.c 2010-05-04 05:27:23.000000000 -0600
|
|
|
b9ba6d |
+++ b/crypt/md5.c 2013-01-02 13:21:20.140576889 -0700
|
|
|
b9ba6d |
@@ -1,6 +1,6 @@
|
|
|
b9ba6d |
/* Functions to compute MD5 message digest of files or memory blocks.
|
|
|
b9ba6d |
according to the definition of MD5 in RFC 1321 from April 1992.
|
|
|
b9ba6d |
- Copyright (C) 1995,1996,1997,1999,2000,2001,2005
|
|
|
b9ba6d |
+ Copyright (C) 1995,1996,1997,1999,2000,2001,2005,2011
|
|
|
b9ba6d |
Free Software Foundation, Inc.
|
|
|
b9ba6d |
This file is part of the GNU C Library.
|
|
|
b9ba6d |
|
|
|
b9ba6d |
@@ -123,9 +123,9 @@ md5_finish_ctx (ctx, resbuf)
|
|
|
b9ba6d |
memcpy (&ctx->buffer[bytes], fillbuf, pad);
|
|
|
b9ba6d |
|
|
|
b9ba6d |
/* Put the 64-bit file length in *bits* at the end of the buffer. */
|
|
|
b9ba6d |
- *(md5_uint32 *) &ctx->buffer[bytes + pad] = SWAP (ctx->total[0] << 3);
|
|
|
b9ba6d |
- *(md5_uint32 *) &ctx->buffer[bytes + pad + 4] = SWAP ((ctx->total[1] << 3) |
|
|
|
b9ba6d |
- (ctx->total[0] >> 29));
|
|
|
b9ba6d |
+ ctx->buffer32[(bytes + pad) / 4] = SWAP (ctx->total[0] << 3);
|
|
|
b9ba6d |
+ ctx->buffer32[(bytes + pad + 4) / 4] = SWAP ((ctx->total[1] << 3) |
|
|
|
b9ba6d |
+ (ctx->total[0] >> 29));
|
|
|
b9ba6d |
|
|
|
b9ba6d |
/* Process last bytes. */
|
|
|
b9ba6d |
md5_process_block (ctx->buffer, bytes + pad + 8, ctx);
|
|
|
b9ba6d |
diff -Nrup a/crypt/md5.h b/crypt/md5.h
|
|
|
b9ba6d |
--- a/crypt/md5.h 2010-05-04 05:27:23.000000000 -0600
|
|
|
b9ba6d |
+++ b/crypt/md5.h 2013-01-02 13:21:20.140576889 -0700
|
|
|
b9ba6d |
@@ -1,6 +1,6 @@
|
|
|
b9ba6d |
/* Declaration of functions and data types used for MD5 sum computing
|
|
|
b9ba6d |
library functions.
|
|
|
b9ba6d |
- Copyright (C) 1995-1997,1999,2000,2001,2004,2005
|
|
|
b9ba6d |
+ Copyright (C) 1995-1997,1999,2000,2001,2004,2005,2011
|
|
|
b9ba6d |
Free Software Foundation, Inc.
|
|
|
b9ba6d |
This file is part of the GNU C Library.
|
|
|
b9ba6d |
|
|
|
b9ba6d |
@@ -88,7 +88,11 @@ struct md5_ctx
|
|
|
b9ba6d |
|
|
|
b9ba6d |
md5_uint32 total[2];
|
|
|
b9ba6d |
md5_uint32 buflen;
|
|
|
b9ba6d |
- char buffer[128] __attribute__ ((__aligned__ (__alignof__ (md5_uint32))));
|
|
|
b9ba6d |
+ union
|
|
|
b9ba6d |
+ {
|
|
|
b9ba6d |
+ char buffer[128];
|
|
|
b9ba6d |
+ md5_uint32 buffer32[32];
|
|
|
b9ba6d |
+ };
|
|
|
b9ba6d |
};
|
|
|
b9ba6d |
|
|
|
b9ba6d |
/*
|