summaryrefslogtreecommitdiff
path: root/indra/llcommon/llmd5.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcommon/llmd5.cpp')
-rwxr-xr-xindra/llcommon/llmd5.cpp12
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);