Commit 8b085635 authored by Rolf Eike Beer's avatar Rolf Eike Beer Committed by Brad King
Browse files

MD5: avoid casting back and forth between size_t and int

Change-Id: Ia74f41c2bb0dc7b164c7a2920acdedcfe17a2899
parent a99a9235
......@@ -478,11 +478,16 @@ void kwsysMD5_Initialize(kwsysMD5* md5)
void kwsysMD5_Append(kwsysMD5* md5, unsigned char const* data, int length)
size_t dlen;
if(length < 0)
length = (int)strlen((char const*)data);
dlen = strlen((char const*)data);
md5_append(&md5->md5_state, (md5_byte_t const*)data, (size_t)length);
dlen = (size_t)length;
md5_append(&md5->md5_state, (md5_byte_t const*)data, dlen);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment