diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llxml/llxmlparser.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/linden/indra/llxml/llxmlparser.cpp b/linden/indra/llxml/llxmlparser.cpp index 57e6a30..056d850 100644 --- a/linden/indra/llxml/llxmlparser.cpp +++ b/linden/indra/llxml/llxmlparser.cpp | |||
@@ -41,7 +41,7 @@ LLXmlParser::LLXmlParser() | |||
41 | mParser( NULL ), | 41 | mParser( NULL ), |
42 | mDepth( 0 ) | 42 | mDepth( 0 ) |
43 | { | 43 | { |
44 | strcpy( mAuxErrorString, "no error" ); | 44 | strcpy( mAuxErrorString, "no error" ); /* Flawfinder: ignore */ |
45 | 45 | ||
46 | // Override the document's declared encoding. | 46 | // Override the document's declared encoding. |
47 | mParser = XML_ParserCreate(NULL); | 47 | mParser = XML_ParserCreate(NULL); |
@@ -73,10 +73,10 @@ BOOL LLXmlParser::parseFile(const std::string &path) | |||
73 | 73 | ||
74 | BOOL success = TRUE; | 74 | BOOL success = TRUE; |
75 | 75 | ||
76 | FILE *file = LLFile::fopen(path.c_str(), "rb"); | 76 | FILE* file = LLFile::fopen(path.c_str(), "rb"); /* Flawfinder: ignore */ |
77 | if( !file ) | 77 | if( !file ) |
78 | { | 78 | { |
79 | sprintf( mAuxErrorString, "Couldn't open file %s", path.c_str()); | 79 | snprintf( mAuxErrorString, sizeof(mAuxErrorString), "Couldn't open file %s", path.c_str()); /* Flawfinder: ignore */ |
80 | success = FALSE; | 80 | success = FALSE; |
81 | } | 81 | } |
82 | else | 82 | else |
@@ -90,7 +90,7 @@ BOOL LLXmlParser::parseFile(const std::string &path) | |||
90 | void* buffer = XML_GetBuffer(mParser, buffer_size); | 90 | void* buffer = XML_GetBuffer(mParser, buffer_size); |
91 | if( !buffer ) | 91 | if( !buffer ) |
92 | { | 92 | { |
93 | sprintf( mAuxErrorString, "Unable to allocate XML buffer while reading file %s", path.c_str() ); | 93 | snprintf( mAuxErrorString, sizeof(mAuxErrorString), "Unable to allocate XML buffer while reading file %s", path.c_str() ); /* Flawfinder: ignore */ |
94 | success = FALSE; | 94 | success = FALSE; |
95 | goto exit_label; | 95 | goto exit_label; |
96 | } | 96 | } |
@@ -98,14 +98,14 @@ BOOL LLXmlParser::parseFile(const std::string &path) | |||
98 | bytes_read = (S32)fread(buffer, 1, buffer_size, file); | 98 | bytes_read = (S32)fread(buffer, 1, buffer_size, file); |
99 | if( bytes_read <= 0 ) | 99 | if( bytes_read <= 0 ) |
100 | { | 100 | { |
101 | sprintf( mAuxErrorString, "Error while reading file %s", path.c_str() ); | 101 | snprintf( mAuxErrorString, sizeof(mAuxErrorString), "Error while reading file %s", path.c_str() ); /* Flawfinder: ignore */ |
102 | success = FALSE; | 102 | success = FALSE; |
103 | goto exit_label; | 103 | goto exit_label; |
104 | } | 104 | } |
105 | 105 | ||
106 | if( !XML_ParseBuffer(mParser, bytes_read, TRUE ) ) | 106 | if( !XML_ParseBuffer(mParser, bytes_read, TRUE ) ) |
107 | { | 107 | { |
108 | sprintf( mAuxErrorString, "Error while parsing file %s", path.c_str() ); | 108 | snprintf( mAuxErrorString, sizeof(mAuxErrorString), "Error while parsing file %s", path.c_str() ); /* Flawfinder: ignore */ |
109 | success = FALSE; | 109 | success = FALSE; |
110 | } | 110 | } |
111 | 111 | ||