diff options
author | Rider Linden <rider@lindenlab.com> | 2018-09-26 13:46:45 -0700 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2018-09-26 13:46:45 -0700 |
commit | 78866b33a9f3a44db11a18245e8a37c834297a46 (patch) | |
tree | fd5c39a17334de8602ee2f20df020eaaa6e01e55 /indra/llcharacter | |
parent | 2d5fa7a732661f97b028ddcbabdd4fb3ba825a52 (diff) | |
parent | 58aef8beaf79dc83546a7b080014ca5030733ac8 (diff) |
Merge
Diffstat (limited to 'indra/llcharacter')
-rw-r--r-- | indra/llcharacter/llkeyframemotion.cpp | 11 |
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; } |