summaryrefslogtreecommitdiff
path: root/indra/lscript/lscript_compile
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2008-06-26 00:39:00 +0000
committerSteven Bennetts <steve@lindenlab.com>2008-06-26 00:39:00 +0000
commit25c10ed028da5c547b11f1f461916897272b0e6d (patch)
tree350a5858f8970b6e28b2dc395625d74d8bd597b2 /indra/lscript/lscript_compile
parent6dd125d375b38455997a0c4b8747659f4c2351aa (diff)
QAR-628 merge string-cleanup-5 -r 90476:90508 -> release
dataserver-is-deprecated
Diffstat (limited to 'indra/lscript/lscript_compile')
-rw-r--r--indra/lscript/lscript_compile/indra.l4
-rw-r--r--indra/lscript/lscript_compile/lscript_tree.cpp6
-rw-r--r--indra/lscript/lscript_compile/lscript_tree.h2
3 files changed, 5 insertions, 7 deletions
diff --git a/indra/lscript/lscript_compile/indra.l b/indra/lscript/lscript_compile/indra.l
index eec3cb7bbf..5f649d1f8d 100644
--- a/indra/lscript/lscript_compile/indra.l
+++ b/indra/lscript/lscript_compile/indra.l
@@ -691,10 +691,10 @@ BOOL lscript_compile(const char* src_filename, const char* dst_filename,
init_temp_jumps();
gAllocationManager = new LLScriptAllocationManager();
- yyin = LLFile::fopen(src_filename, "r");
+ yyin = LLFile::fopen(std::string(src_filename), "r");
if (yyin)
{
- yyout = LLFile::fopen(err_filename, "w");
+ yyout = LLFile::fopen(std::string(err_filename), "w");
// Reset the lexer's internal buffering.
diff --git a/indra/lscript/lscript_compile/lscript_tree.cpp b/indra/lscript/lscript_compile/lscript_tree.cpp
index efbbe374ed..3a93f7b896 100644
--- a/indra/lscript/lscript_compile/lscript_tree.cpp
+++ b/indra/lscript/lscript_compile/lscript_tree.cpp
@@ -9704,8 +9704,7 @@ LLScriptScript::LLScriptScript(LLScritpGlobalStorage *globals,
mStates(states), mGlobalScope(NULL), mGlobals(NULL), mGlobalFunctions(NULL), mGodLike(FALSE)
{
const char DEFAULT_BYTECODE_FILENAME[] = "lscript.lso";
- strncpy(mBytecodeDest, DEFAULT_BYTECODE_FILENAME, sizeof(mBytecodeDest) -1); /*Flawfinder: ignore*/
- mBytecodeDest[MAX_STRING-1] = '\0';
+ mBytecodeDest = DEFAULT_BYTECODE_FILENAME;
LLScriptGlobalVariable *tvar;
LLScriptGlobalFunctions *tfunc;
LLScritpGlobalStorage *temp;
@@ -9751,8 +9750,7 @@ LLScriptScript::LLScriptScript(LLScritpGlobalStorage *globals,
void LLScriptScript::setBytecodeDest(const char* dst_filename)
{
- strncpy(mBytecodeDest, dst_filename, MAX_STRING); /*Flawfinder: ignore*/
- mBytecodeDest[MAX_STRING-1] = '\0';
+ mBytecodeDest = ll_safe_string(dst_filename);
}
void print_cil_globals(LLFILE* fp, LLScriptGlobalVariable* global)
diff --git a/indra/lscript/lscript_compile/lscript_tree.h b/indra/lscript/lscript_compile/lscript_tree.h
index f80d7fdf24..4c25c097d8 100644
--- a/indra/lscript/lscript_compile/lscript_tree.h
+++ b/indra/lscript/lscript_compile/lscript_tree.h
@@ -2269,7 +2269,7 @@ public:
BOOL mGodLike;
private:
- char mBytecodeDest[MAX_STRING]; /*Flawfinder: ignore*/
+ std::string mBytecodeDest;
};
class LLScriptAllocationManager