]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix compilation in dev-mode
authorKinsey Moore <kmoore@digium.com>
Mon, 11 Jun 2012 14:11:14 +0000 (14:11 +0000)
committerKinsey Moore <kmoore@digium.com>
Mon, 11 Jun 2012 14:11:14 +0000 (14:11 +0000)
Backport a compilation fix in md5.c from trunk that only showed up in
dev-mode under certain compiler versions.
........

Merged revisions 368719 from http://svn.asterisk.org/svn/asterisk/branches/1.8

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@368721 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/md5.c

index cbca747a364c67f7541dcdf6301ad4314ea201d2..d4c7b18848c78b083b770827c3b4956512dce380 100644 (file)
@@ -123,6 +123,7 @@ void MD5Final(unsigned char digest[16], struct MD5Context *ctx)
 {
        unsigned count;
        unsigned char *p;
+       uint32_t *in_buf;
 
        /* Compute number of bytes mod 64 */
        count = (ctx->bits[0] >> 3) & 0x3F;
@@ -151,8 +152,9 @@ void MD5Final(unsigned char digest[16], struct MD5Context *ctx)
        byteReverse(ctx->in, 14);
 
        /* Append length in bits and transform */
-       ((uint32_t *) ctx->in)[14] = ctx->bits[0];
-       ((uint32_t *) ctx->in)[15] = ctx->bits[1];
+       in_buf = (uint32_t *) ctx->in;
+       in_buf[14] = ctx->bits[0];
+       in_buf[15] = ctx->bits[1];
 
        MD5Transform(ctx->buf, (uint32_t *) ctx->in);
        byteReverse((unsigned char *) ctx->buf, 4);