summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/md5calc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/md5calc.c b/src/common/md5calc.c
index d5ebcf8..3f2e009 100644
--- a/src/common/md5calc.c
+++ b/src/common/md5calc.c
@@ -198,7 +198,7 @@ MD5_state MD5_from_string(const char* msg, const size_t msglen)
if (64 - rem > 8)
{
for (int i=0; i<8; i++)
- buf[0x38+i] = (msglen*8) >> (i*8);
+ buf[0x38+i] = ((uint64_t)msglen*8) >> (i*8);
}
for (int i=0; i<0x10; i++)
X[i] = buf[4*i+0] | buf[4*i+1]<<8 | buf[4*i+2]<<16 | buf[4*i+3]<<24;
@@ -207,7 +207,7 @@ MD5_state MD5_from_string(const char* msg, const size_t msglen)
{
memset(buf,'\0', 0x38);
for (int i=0; i<8; i++)
- buf[0x38+i] = (msglen*8) >> (i*8);
+ buf[0x38+i] = ((uint64_t)msglen*8) >> (i*8);
for (int i=0; i<0x10; i++)
X[i] = buf[4*i+0] | buf[4*i+1]<<8 | buf[4*i+2]<<16 | buf[4*i+3]<<24;
MD5_do_block(&state, block);