diff options
| author | Oz Linden <oz@lindenlab.com> | 2015-06-15 15:53:45 -0400 |
|---|---|---|
| committer | Oz Linden <oz@lindenlab.com> | 2015-06-15 15:53:45 -0400 |
| commit | 95fc2d48eced78b2aaa29b9e8b3f9410eed1ad8c (patch) | |
| tree | 7748f0142e0ecbc91daa33c42a679799c4375d5e /indra/llcommon/llmd5.cpp | |
| parent | 96d16928600dbf3666221a19575af9330840cfd5 (diff) | |
| parent | e0f5ed29daa3b2803aaec60a77bde8df7df292ee (diff) | |
merge changes for 3.7.30-release
Diffstat (limited to 'indra/llcommon/llmd5.cpp')
| -rwxr-xr-x | indra/llcommon/llmd5.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/indra/llcommon/llmd5.cpp b/indra/llcommon/llmd5.cpp index ed80af36d8..f942a976b7 100755 --- a/indra/llcommon/llmd5.cpp +++ b/indra/llcommon/llmd5.cpp @@ -118,6 +118,12 @@ void LLMD5::update (const uint1 *input, const uint4 input_length) { buffer_space = 64 - buffer_index; // how much space is left in buffer + // now, transform each 64-byte piece of the input, bypassing the buffer + if (input == NULL || input_length == 0){ + std::cerr << "LLMD5::update: Invalid input!" << std::endl; + return; + } + // Transform as many times as possible. if (input_length >= buffer_space) { // ie. we have enough to fill the buffer // fill the rest of the buffer and transform @@ -127,12 +133,6 @@ void LLMD5::update (const uint1 *input, const uint4 input_length) { buffer_space); transform (buffer); - // now, transform each 64-byte piece of the input, bypassing the buffer - if (input == NULL || input_length == 0){ - std::cerr << "LLMD5::update: Invalid input!" << std::endl; - return; - } - for (input_index = buffer_space; input_index + 63 < input_length; input_index += 64) transform (input+input_index); |
