summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2018-03-20 13:12:10 (GMT)
committerTobias Markmann <tm@ayena.de>2018-03-20 14:48:04 (GMT)
commitf2c2c7d035029fb9615b42c18ccea83e8e705b10 (patch)
tree2f56fb77de0f366528395f21732d418f016f63b5 /3rdParty/Breakpad/src/common/md5.cc
parent44581c5285d13c0ec715b35ddc79177e5ebeef39 (diff)
parent5ba3f18ad8efa040d49f36d83ec2e7891a9add9f (diff)
downloadswift-f2c2c7d035029fb9615b42c18ccea83e8e705b10.zip
swift-f2c2c7d035029fb9615b42c18ccea83e8e705b10.tar.bz2
Merge branch 'swift-4.x'swift-5.0alpha2
* swift-4.x: (44 commits) Test-Information: Builds on macOS 10.13.3 with clang trunk. Change-Id: If50381f103b0ad18d038b920d3d43537642141cb
Diffstat (limited to '3rdParty/Breakpad/src/common/md5.cc')
-rw-r--r--3rdParty/Breakpad/src/common/md5.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/3rdParty/Breakpad/src/common/md5.cc b/3rdParty/Breakpad/src/common/md5.cc
index bccf61c..4f1ac8c 100644
--- a/3rdParty/Breakpad/src/common/md5.cc
+++ b/3rdParty/Breakpad/src/common/md5.cc
@@ -58,7 +58,7 @@ void MD5Init(struct MD5Context *ctx)
* Update context to reflect the concatenation of another buffer full
* of bytes.
*/
-void MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len)
+void MD5Update(struct MD5Context *ctx, unsigned char const *buf, size_t len)
{
u32 t;
@@ -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);
@@ -166,7 +166,7 @@ void MD5Final(unsigned char digest[16], struct MD5Context *ctx)
*/
static void MD5Transform(u32 buf[4], u32 const in[16])
{
- register u32 a, b, c, d;
+ u32 a, b, c, d;
a = buf[0];
b = buf[1];