aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_md5.cpp
diff options
context:
space:
mode:
authorGravatar Dominic Hamon2021-05-30 20:37:54 +0100
committerGravatar GitHub2021-05-30 20:37:54 +0100
commit02340285c564a7e82105137192d46d554a6fce3a (patch)
tree696d1a6249841de62c3fed70310c2a347fc66732 /src/modules/m_md5.cpp
parentAdd a workaround for a bug in GitHub Actions. (diff)
Added -Wshorten-64-to-32 and fixed all warnings.
Diffstat (limited to 'src/modules/m_md5.cpp')
-rw-r--r--src/modules/m_md5.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/m_md5.cpp b/src/modules/m_md5.cpp
index 9e2ee7022..bc79a3089 100644
--- a/src/modules/m_md5.cpp
+++ b/src/modules/m_md5.cpp
@@ -76,14 +76,14 @@ class MD5Provider : public HashProvider
ctx->bytes[1] = 0;
}
- void MD5Update(MD5Context *ctx, byte const *buf, int len)
+ void MD5Update(MD5Context *ctx, byte const *buf, size_t len)
{
word32 t;
/* Update byte count */
t = ctx->bytes[0];
- if ((ctx->bytes[0] = t + len) < t)
+ if ((ctx->bytes[0] = word32(t + len)) < t)
ctx->bytes[1]++; /* Carry from low to high */
t = 64 - (t & 0x3f); /* Space available in ctx->in (at least 1) */
@@ -229,7 +229,7 @@ class MD5Provider : public HashProvider
}
- void MyMD5(void *dest, void *orig, int len)
+ void MyMD5(void *dest, void *orig, size_t len)
{
MD5Context context;
MD5Init(&context);