From 25c10ed028da5c547b11f1f461916897272b0e6d Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Thu, 26 Jun 2008 00:39:00 +0000 Subject: QAR-628 merge string-cleanup-5 -r 90476:90508 -> release dataserver-is-deprecated --- indra/lscript/lscript_compile/lscript_tree.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'indra/lscript/lscript_compile/lscript_tree.cpp') 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) -- cgit v1.2.3