summaryrefslogtreecommitdiff
path: root/indra/llcharacter
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2018-08-11 09:02:16 -0400
committerNat Goodspeed <nat@lindenlab.com>2018-08-11 09:02:16 -0400
commitf6735af9315ed91a0d28804252c1351c9d4b379f (patch)
tree1b1fc36446fd12164f28a0d9b62bd2e89fd1601c /indra/llcharacter
parent00839eb6350627c6272dea242b85ea24544cea33 (diff)
parent470e4b5afc7f0fd516eca9d61b95ff770adf3978 (diff)
Automated merge with ssh://bitbucket.org/nat_linden/viewer-no-popup
Diffstat (limited to 'indra/llcharacter')
-rw-r--r--indra/llcharacter/llkeyframemotion.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp
index f12c64023a..330d812985 100644
--- a/indra/llcharacter/llkeyframemotion.cpp
+++ b/indra/llcharacter/llkeyframemotion.cpp
@@ -579,8 +579,15 @@ LLMotion::LLMotionInitStatus LLKeyframeMotion::onInitialize(LLCharacter *charact
else
{
anim_file_size = anim_file->getSize();
- anim_data = new U8[anim_file_size];
- success = anim_file->read(anim_data, anim_file_size); /*Flawfinder: ignore*/
+ anim_data = new(std::nothrow) U8[anim_file_size];
+ if (anim_data)
+ {
+ success = anim_file->read(anim_data, anim_file_size); /*Flawfinder: ignore*/
+ }
+ else
+ {
+ LL_WARNS() << "Failed to allocate buffer: " << anim_file_size << mID << LL_ENDL;
+ }
delete anim_file;
anim_file = NULL;
}