summaryrefslogtreecommitdiff
path: root/indra/llui/lltexteditor.cpp
diff options
context:
space:
mode:
authorAaron Brashears <aaronb@lindenlab.com>2007-02-02 17:28:58 +0000
committerAaron Brashears <aaronb@lindenlab.com>2007-02-02 17:28:58 +0000
commit305c74d5163c5e344a675d39ca2394a9e45bd2c2 (patch)
tree42836c4a6010b2b015156024d3cfb6bf64a48ad6 /indra/llui/lltexteditor.cpp
parent54d89549df38bb61881583a3eb8d3645c107d79f (diff)
Result of svn merge -r57264:57370 svn+ssh://svn/svn/linden/branches/adroit.r40-68 into release.
Diffstat (limited to 'indra/llui/lltexteditor.cpp')
-rw-r--r--indra/llui/lltexteditor.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index a4747aef67..710e333796 100644
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -3763,7 +3763,7 @@ BOOL LLTextEditor::importBuffer(const LLString& buffer )
// <text without \0> (text may contain ext_char_values)
// }\n
- char tbuf[MAX_STRING];
+ char tbuf[MAX_STRING]; /* Flawfinder: ignore */
S32 version = 0;
instream.getline(tbuf, MAX_STRING);
@@ -3803,11 +3803,16 @@ BOOL LLTextEditor::importBuffer(const LLString& buffer )
BOOL success = TRUE;
char* text = new char[ text_len + 1];
+ if (text == NULL)
+ {
+ llerrs << "Memory allocation failure." << llendl;
+ return FALSE;
+ }
instream.get(text, text_len + 1, '\0');
text[text_len] = '\0';
- if( text_len != (S32)strlen(text) )
+ if( text_len != (S32)strlen(text) )/* Flawfinder: ignore */
{
- llwarns << llformat("Invalid text length: %d != %d ",strlen(text),text_len) << llendl;
+ llwarns << llformat("Invalid text length: %d != %d ",strlen(text),text_len) << llendl;/* Flawfinder: ignore */
success = FALSE;
}