summaryrefslogtreecommitdiff
path: root/indra/newview/llgesturemgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llgesturemgr.cpp')
-rw-r--r--indra/newview/llgesturemgr.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp
index b9ae06963f..d66916e8f1 100644
--- a/indra/newview/llgesturemgr.cpp
+++ b/indra/newview/llgesturemgr.cpp
@@ -856,7 +856,13 @@ void LLGestureManager::onLoadComplete(LLVFS *vfs,
S32 size = file.getSize();
char* buffer = new char[size+1];
- file.read((U8*)buffer, size);
+ if (buffer == NULL)
+ {
+ llerrs << "Memory Allocation Failed" << llendl;
+ return;
+ }
+
+ file.read((U8*)buffer, size); /* Flawfinder: ignore */
// ensure there's a trailing NULL so strlen will work.
buffer[size] = '\0';