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