md5: fix strict aliasing warnings

Change-Id: I64f4570610c625b1325249fd5fa1b9edc3a89ae4
Reviewed-on: https://chromium-review.googlesource.com/438864
Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
This commit is contained in:
Mike Frysinger 2017-02-06 15:48:27 -05:00
parent 8f5741078d
commit 6c78460419

View File

@ -138,8 +138,8 @@ void MD5Final(unsigned char digest[16], struct MD5Context *ctx)
byteReverse(ctx->in, 14);
/* Append length in bits and transform */
((u32 *) ctx->in)[14] = ctx->bits[0];
((u32 *) ctx->in)[15] = ctx->bits[1];
memcpy(&ctx->in[14], &ctx->bits[0], sizeof(u32));
memcpy(&ctx->in[15], &ctx->bits[1], sizeof(u32));
MD5Transform(ctx->buf, (u32 *) ctx->in);
byteReverse((unsigned char *) ctx->buf, 4);