aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llxml/llxmlparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/llxml/llxmlparser.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/linden/indra/llxml/llxmlparser.cpp b/linden/indra/llxml/llxmlparser.cpp
index 056d850..4162e7d 100644
--- a/linden/indra/llxml/llxmlparser.cpp
+++ b/linden/indra/llxml/llxmlparser.cpp
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2002-2007`, Linden Research, Inc. 5 * Copyright (c) 2002-2007`, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
@@ -76,7 +77,7 @@ BOOL LLXmlParser::parseFile(const std::string &path)
76 FILE* file = LLFile::fopen(path.c_str(), "rb"); /* Flawfinder: ignore */ 77 FILE* file = LLFile::fopen(path.c_str(), "rb"); /* Flawfinder: ignore */
77 if( !file ) 78 if( !file )
78 { 79 {
79 snprintf( mAuxErrorString, sizeof(mAuxErrorString), "Couldn't open file %s", path.c_str()); /* Flawfinder: ignore */ 80 snprintf( mAuxErrorString, sizeof(mAuxErrorString), "Couldn't open file %s", path.c_str()); /* Flawfinder: ignore */
80 success = FALSE; 81 success = FALSE;
81 } 82 }
82 else 83 else
@@ -90,7 +91,7 @@ BOOL LLXmlParser::parseFile(const std::string &path)
90 void* buffer = XML_GetBuffer(mParser, buffer_size); 91 void* buffer = XML_GetBuffer(mParser, buffer_size);
91 if( !buffer ) 92 if( !buffer )
92 { 93 {
93 snprintf( mAuxErrorString, sizeof(mAuxErrorString), "Unable to allocate XML buffer while reading file %s", path.c_str() ); /* Flawfinder: ignore */ 94 snprintf( mAuxErrorString, sizeof(mAuxErrorString), "Unable to allocate XML buffer while reading file %s", path.c_str() ); /* Flawfinder: ignore */
94 success = FALSE; 95 success = FALSE;
95 goto exit_label; 96 goto exit_label;
96 } 97 }
@@ -98,14 +99,14 @@ BOOL LLXmlParser::parseFile(const std::string &path)
98 bytes_read = (S32)fread(buffer, 1, buffer_size, file); 99 bytes_read = (S32)fread(buffer, 1, buffer_size, file);
99 if( bytes_read <= 0 ) 100 if( bytes_read <= 0 )
100 { 101 {
101 snprintf( mAuxErrorString, sizeof(mAuxErrorString), "Error while reading file %s", path.c_str() ); /* Flawfinder: ignore */ 102 snprintf( mAuxErrorString, sizeof(mAuxErrorString), "Error while reading file %s", path.c_str() ); /* Flawfinder: ignore */
102 success = FALSE; 103 success = FALSE;
103 goto exit_label; 104 goto exit_label;
104 } 105 }
105 106
106 if( !XML_ParseBuffer(mParser, bytes_read, TRUE ) ) 107 if( !XML_ParseBuffer(mParser, bytes_read, TRUE ) )
107 { 108 {
108 snprintf( mAuxErrorString, sizeof(mAuxErrorString), "Error while parsing file %s", path.c_str() ); /* Flawfinder: ignore */ 109 snprintf( mAuxErrorString, sizeof(mAuxErrorString), "Error while parsing file %s", path.c_str() ); /* Flawfinder: ignore */
109 success = FALSE; 110 success = FALSE;
110 } 111 }
111 112