diff --git a/juce_amalgamated.cpp b/juce_amalgamated.cpp index 2217285426..fbb938a132 100644 --- a/juce_amalgamated.cpp +++ b/juce_amalgamated.cpp @@ -4510,7 +4510,7 @@ void MD5::ProcessContext::processBlock (const uint8* const data, size_t dataSize i = spaceLeft; - while (i < dataSize - 63) + while (i + 64 <= dataSize) { transform (data + i); i += 64; diff --git a/src/cryptography/juce_MD5.cpp b/src/cryptography/juce_MD5.cpp index db0a35b4b4..e7995f0bc9 100644 --- a/src/cryptography/juce_MD5.cpp +++ b/src/cryptography/juce_MD5.cpp @@ -163,7 +163,7 @@ void MD5::ProcessContext::processBlock (const uint8* const data, size_t dataSize i = spaceLeft; - while (i < dataSize - 63) + while (i + 64 <= dataSize) { transform (data + i); i += 64;