summaryrefslogtreecommitdiff
path: root/indra/lscript/lscript_compile/lscript_tree.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/lscript/lscript_compile/lscript_tree.cpp')
-rw-r--r--indra/lscript/lscript_compile/lscript_tree.cpp6
1 files changed, 2 insertions, 4 deletions
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)