diff options
author | Aaron Brashears <aaronb@lindenlab.com> | 2007-02-02 17:28:58 +0000 |
---|---|---|
committer | Aaron Brashears <aaronb@lindenlab.com> | 2007-02-02 17:28:58 +0000 |
commit | 305c74d5163c5e344a675d39ca2394a9e45bd2c2 (patch) | |
tree | 42836c4a6010b2b015156024d3cfb6bf64a48ad6 /indra/llxml/llxmlparser.cpp | |
parent | 54d89549df38bb61881583a3eb8d3645c107d79f (diff) |
Result of svn merge -r57264:57370 svn+ssh://svn/svn/linden/branches/adroit.r40-68 into release.
Diffstat (limited to 'indra/llxml/llxmlparser.cpp')
-rw-r--r-- | indra/llxml/llxmlparser.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/indra/llxml/llxmlparser.cpp b/indra/llxml/llxmlparser.cpp index baaeedf586..c3d791179a 100644 --- a/indra/llxml/llxmlparser.cpp +++ b/indra/llxml/llxmlparser.cpp @@ -22,7 +22,7 @@ LLXmlParser::LLXmlParser() mParser( NULL ), mDepth( 0 ) { - strcpy( mAuxErrorString, "no error" ); + strcpy( mAuxErrorString, "no error" ); /* Flawfinder: ignore */ // Override the document's declared encoding. mParser = XML_ParserCreate(NULL); @@ -54,10 +54,10 @@ BOOL LLXmlParser::parseFile(const std::string &path) BOOL success = TRUE; - FILE *file = LLFile::fopen(path.c_str(), "rb"); + FILE* file = LLFile::fopen(path.c_str(), "rb"); /* Flawfinder: ignore */ if( !file ) { - sprintf( mAuxErrorString, "Couldn't open file %s", path.c_str()); + snprintf( mAuxErrorString, sizeof(mAuxErrorString), "Couldn't open file %s", path.c_str()); /* Flawfinder: ignore */ success = FALSE; } else @@ -71,7 +71,7 @@ BOOL LLXmlParser::parseFile(const std::string &path) void* buffer = XML_GetBuffer(mParser, buffer_size); if( !buffer ) { - sprintf( mAuxErrorString, "Unable to allocate XML buffer while reading file %s", path.c_str() ); + snprintf( mAuxErrorString, sizeof(mAuxErrorString), "Unable to allocate XML buffer while reading file %s", path.c_str() ); /* Flawfinder: ignore */ success = FALSE; goto exit_label; } @@ -79,14 +79,14 @@ BOOL LLXmlParser::parseFile(const std::string &path) bytes_read = (S32)fread(buffer, 1, buffer_size, file); if( bytes_read <= 0 ) { - sprintf( mAuxErrorString, "Error while reading file %s", path.c_str() ); + snprintf( mAuxErrorString, sizeof(mAuxErrorString), "Error while reading file %s", path.c_str() ); /* Flawfinder: ignore */ success = FALSE; goto exit_label; } if( !XML_ParseBuffer(mParser, bytes_read, TRUE ) ) { - sprintf( mAuxErrorString, "Error while parsing file %s", path.c_str() ); + snprintf( mAuxErrorString, sizeof(mAuxErrorString), "Error while parsing file %s", path.c_str() ); /* Flawfinder: ignore */ success = FALSE; } |