diff options
| author | nat_linden <nat@lindenlab.com> | 2015-04-15 10:50:46 -0400 |
|---|---|---|
| committer | nat_linden <nat@lindenlab.com> | 2015-04-15 10:50:46 -0400 |
| commit | 75396e1f131137d7f0dfb3f5fdbddeea1ce12fba (patch) | |
| tree | 33ca8281a889107816663e2bacfc44cfeeb9e815 /indra/llcommon/llmd5.cpp | |
| parent | e59dbf1b23a13c6a7f1f0d9661d3dcb78ea040f2 (diff) | |
| parent | e611e35e033e99f619b0e4938f6879c8e387efd5 (diff) | |
Merged lindenlab/viewer-tools-update into default
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); |
