summaryrefslogtreecommitdiff
path: root/indra/llcommon/llmd5.cpp
diff options
context:
space:
mode:
authorCinder Biscuits <cinder@alchemyviewer.org>2015-11-29 20:14:22 -0700
committerCinder Biscuits <cinder@alchemyviewer.org>2015-11-29 20:14:22 -0700
commitcc235cdcc41fb1846b878769f5d4097ff9ad3b4d (patch)
treed34f501bcfd68cad9dd2a3a3bbbb03129e24462f /indra/llcommon/llmd5.cpp
parent0ba5502506d84fb2a41ce62cb8025ec93b652d38 (diff)
parente611e35e033e99f619b0e4938f6879c8e387efd5 (diff)
Merged lindenlab/viewer-tools-update into default
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);