diff options
author | ruslantproductengine <ruslantproductengine@lindenlab.com> | 2014-11-03 20:05:20 +0200 |
---|---|---|
committer | ruslantproductengine <ruslantproductengine@lindenlab.com> | 2014-11-03 20:05:20 +0200 |
commit | 799d13269a5cdf29a5d68c15ceac42f0407b5833 (patch) | |
tree | ae1f17a27c9d1d02f302d2b5c73ed0aea25e8371 /indra/llcommon | |
parent | f3d73d9e724e9ae1062bf109b6764d43ccba3114 (diff) |
MAINT-3585 FIXED Viewer Crashes when attempting to upload image.
The bug was fixed, the reasone of crash is following. The Core Flow view
contain another GL context and will not care about restoring a previous.
I restore context manually.
This path also contain a minor changes in another files.
All changes described here.
Сhange's for fix current bug.
indra/llwindow/llwindow.h
indra/llwindow/llwindowheadless.h
indra/llwindow/llwindowmacosx.h
indra/llwindow/llwindowsdl.h
indra/llwindow/llwindowwin32.h
indra/newview/lllocalbitmaps.cpp
indra/newview/llviewerdisplay.cpp
indra/newview/llviewerdisplay.h
Twice mUsage initialization (replace to forward initialization).
indra/llcharacter/lljointstate.h
Looks like condition should be befor memcopy call, otherwise - possible CRASH.
indra/llcommon/llmd5.cpp
Unused condition and variables.
indra/llmath/llsphere.cpp
Looks like should be under if otherwise - possible CRASH
indra\llprimitive\llmodel.cpp
Useless assert's.
indra/llrender/llrender.cpp
indra/newview/lldaycyclemanager.cpp
Diffstat (limited to 'indra/llcommon')
-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); |