From 424af2f2c88eb863c9fdbc20c5322a08f08d8ee2 Mon Sep 17 00:00:00 2001 From: Julian Storer Date: Tue, 19 Jan 2010 16:39:23 +0000 Subject: [PATCH] Fix for the MD5 generator. --- juce_amalgamated.cpp | 2 +- src/cryptography/juce_MD5.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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;