summaryrefslogtreecommitdiff
path: root/src/common/md5calc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/md5calc.cpp')
-rw-r--r--src/common/md5calc.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/md5calc.cpp b/src/common/md5calc.cpp
index 1625912..36f220d 100644
--- a/src/common/md5calc.cpp
+++ b/src/common/md5calc.cpp
@@ -210,7 +210,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] = ((uint64_t)msglen*8) >> (i*8);
+ buf[0x38+i] = (static_cast<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;
@@ -219,7 +219,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] = ((uint64_t)msglen*8) >> (i*8);
+ buf[0x38+i] = (static_cast<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);