aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/lscript
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:50 -0500
committerJacek Antonelli2008-08-15 23:44:50 -0500
commit89fe5dab825a62a0e3fd8d248cbc91c65eb2a426 (patch)
treebcff14b7888d04a2fec799c59369f6095224bd08 /linden/indra/lscript
parentSecond Life viewer sources 1.13.3.2 (diff)
downloadmeta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.zip
meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.gz
meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.bz2
meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.xz
Second Life viewer sources 1.14.0.0
Diffstat (limited to 'linden/indra/lscript')
-rw-r--r--linden/indra/lscript/lscript_byteformat.h6
-rw-r--r--linden/indra/lscript/lscript_compile/indra.l6
-rw-r--r--linden/indra/lscript/lscript_compile/lscript_bytecode.cpp24
-rw-r--r--linden/indra/lscript/lscript_compile/lscript_compile_fb_vc8.vcproj106
-rw-r--r--linden/indra/lscript/lscript_compile/lscript_compile_ly.vcproj110
-rw-r--r--linden/indra/lscript/lscript_compile/lscript_compile_ly_vc8.vcproj131
-rw-r--r--linden/indra/lscript/lscript_compile/lscript_compile_vc8.vcproj329
-rw-r--r--linden/indra/lscript/lscript_compile/lscript_error.cpp4
-rw-r--r--linden/indra/lscript/lscript_compile/lscript_heap.cpp4
-rw-r--r--linden/indra/lscript/lscript_compile/lscript_scope.h32
-rw-r--r--linden/indra/lscript/lscript_compile/lscript_tree.cpp244
-rw-r--r--linden/indra/lscript/lscript_compile/lscript_tree.h2
-rw-r--r--linden/indra/lscript/lscript_execute/lscript_execute.cpp111
-rw-r--r--linden/indra/lscript/lscript_execute/lscript_execute_vc8.vcproj276
-rw-r--r--linden/indra/lscript/lscript_execute/lscript_readlso.cpp8
-rw-r--r--linden/indra/lscript/lscript_library.h89
-rw-r--r--linden/indra/lscript/lscript_library/lscript_alloc.cpp87
-rw-r--r--linden/indra/lscript/lscript_library/lscript_library.cpp44
-rw-r--r--linden/indra/lscript/lscript_library/lscript_library_vc8.vcproj268
19 files changed, 1576 insertions, 305 deletions
diff --git a/linden/indra/lscript/lscript_byteformat.h b/linden/indra/lscript/lscript_byteformat.h
index a69f1fe..8b8e487 100644
--- a/linden/indra/lscript/lscript_byteformat.h
+++ b/linden/indra/lscript/lscript_byteformat.h
@@ -70,7 +70,7 @@ typedef enum e_lscript_registers
70 LREG_EOF 70 LREG_EOF
71} LSCRIPTRegisters; 71} LSCRIPTRegisters;
72 72
73const S32 gLSCRIPTRegisterAddresses[LREG_EOF] = 73const S32 gLSCRIPTRegisterAddresses[LREG_EOF] = /* Flawfinder: ignore */
74{ 74{
75 0, // LREG_INVALID 75 0, // LREG_INVALID
76 4, // LREG_IP 76 4, // LREG_IP
@@ -468,7 +468,7 @@ const U8 LSCRIPTTypeHi4Bits[LST_EOF] =
468 LST_LIST << 4, 468 LST_LIST << 4,
469}; 469};
470 470
471const char * const LSCRIPTTypeNames[LST_EOF] = 471const char * const LSCRIPTTypeNames[LST_EOF] = /*Flawfinder: ignore*/
472{ 472{
473 "VOID", 473 "VOID",
474 "integer", 474 "integer",
@@ -511,7 +511,7 @@ typedef enum e_lscript_runtime_faults
511 LSRF_EOF 511 LSRF_EOF
512} LSCRIPTRunTimeFaults; 512} LSCRIPTRunTimeFaults;
513 513
514extern char *LSCRIPTRunTimeFaultStrings[LSRF_EOF]; 514extern char* LSCRIPTRunTimeFaultStrings[LSRF_EOF]; /*Flawfinder: ignore*/
515 515
516const S32 LSCRIPTRunTimeFaultBits[LSRF_EOF] = 516const S32 LSCRIPTRunTimeFaultBits[LSRF_EOF] =
517{ 517{
diff --git a/linden/indra/lscript/lscript_compile/indra.l b/linden/indra/lscript/lscript_compile/indra.l
index 1290018..f4199df 100644
--- a/linden/indra/lscript/lscript_compile/indra.l
+++ b/linden/indra/lscript/lscript_compile/indra.l
@@ -4,7 +4,7 @@ L [a-zA-Z_]
4H [a-fA-F0-9] 4H [a-fA-F0-9]
5E [Ee][+-]?{D}+ 5E [Ee][+-]?{D}+
6FS (f|F) 6FS (f|F)
7%e 8000 7%e 9000
8%n 4000 8%n 4000
9%p 5000 9%p 5000
10 10
@@ -559,6 +559,10 @@ extern "C" { int yyerror(const char *fmt, ...); }
559"PARCEL_DETAILS_GROUP" { count(); yylval.ival = PARCEL_DETAILS_GROUP; return(INTEGER_CONSTANT); } 559"PARCEL_DETAILS_GROUP" { count(); yylval.ival = PARCEL_DETAILS_GROUP; return(INTEGER_CONSTANT); }
560"PARCEL_DETAILS_AREA" { count(); yylval.ival = PARCEL_DETAILS_AREA; return(INTEGER_CONSTANT); } 560"PARCEL_DETAILS_AREA" { count(); yylval.ival = PARCEL_DETAILS_AREA; return(INTEGER_CONSTANT); }
561 561
562"STRING_TRIM_HEAD" { count(); yylval.ival = STRING_TRIM_HEAD; return(INTEGER_CONSTANT); }
563"STRING_TRIM_TAIL" { count(); yylval.ival = STRING_TRIM_TAIL; return(INTEGER_CONSTANT); }
564"STRING_TRIM" { count(); yylval.ival = STRING_TRIM; return(INTEGER_CONSTANT); }
565
562{L}({L}|{N})* { count(); yylval.sval = new char[strlen(yytext) + 1]; strcpy(yylval.sval, yytext); return(IDENTIFIER); } 566{L}({L}|{N})* { count(); yylval.sval = new char[strlen(yytext) + 1]; strcpy(yylval.sval, yytext); return(IDENTIFIER); }
563 567
564{D}+{E} { count(); yylval.fval = (F32)atof(yytext); return(FP_CONSTANT); } 568{D}+{E} { count(); yylval.fval = (F32)atof(yytext); return(FP_CONSTANT); }
diff --git a/linden/indra/lscript/lscript_compile/lscript_bytecode.cpp b/linden/indra/lscript/lscript_compile/lscript_bytecode.cpp
index 6d18a1a..b696cc6 100644
--- a/linden/indra/lscript/lscript_compile/lscript_bytecode.cpp
+++ b/linden/indra/lscript/lscript_compile/lscript_bytecode.cpp
@@ -78,7 +78,7 @@ void LLScriptByteCodeChunk::addByte(U8 byte)
78 if (mCodeChunk) 78 if (mCodeChunk)
79 { 79 {
80 U8 *temp = new U8[mCurrentOffset + 1]; 80 U8 *temp = new U8[mCurrentOffset + 1];
81 memcpy(temp, mCodeChunk, mCurrentOffset); 81 memcpy(temp, mCodeChunk, mCurrentOffset); /* Flawfinder: ignore */
82 delete [] mCodeChunk; 82 delete [] mCodeChunk;
83 mCodeChunk = temp; 83 mCodeChunk = temp;
84 } 84 }
@@ -102,7 +102,7 @@ void LLScriptByteCodeChunk::addBytes(U8 *bytes, S32 size)
102 if (mCodeChunk) 102 if (mCodeChunk)
103 { 103 {
104 U8 *temp = new U8[mCurrentOffset + size]; 104 U8 *temp = new U8[mCurrentOffset + size];
105 memcpy(temp, mCodeChunk, mCurrentOffset); 105 memcpy(temp, mCodeChunk, mCurrentOffset); /* Flawfinder: ignore */
106 delete [] mCodeChunk; 106 delete [] mCodeChunk;
107 mCodeChunk = temp; 107 mCodeChunk = temp;
108 } 108 }
@@ -110,7 +110,7 @@ void LLScriptByteCodeChunk::addBytes(U8 *bytes, S32 size)
110 { 110 {
111 mCodeChunk = new U8[size]; 111 mCodeChunk = new U8[size];
112 } 112 }
113 memcpy(mCodeChunk + mCurrentOffset, bytes, size); 113 memcpy(mCodeChunk + mCurrentOffset, bytes, size);/* Flawfinder: ignore */
114 mCurrentOffset += size; 114 mCurrentOffset += size;
115} 115}
116 116
@@ -119,7 +119,7 @@ void LLScriptByteCodeChunk::addBytes(char *bytes, S32 size)
119 if (mCodeChunk) 119 if (mCodeChunk)
120 { 120 {
121 U8 *temp = new U8[mCurrentOffset + size]; 121 U8 *temp = new U8[mCurrentOffset + size];
122 memcpy(temp, mCodeChunk, mCurrentOffset); 122 memcpy(temp, mCodeChunk, mCurrentOffset); /*Flawfinder: ignore*/
123 delete [] mCodeChunk; 123 delete [] mCodeChunk;
124 mCodeChunk = temp; 124 mCodeChunk = temp;
125 } 125 }
@@ -127,7 +127,7 @@ void LLScriptByteCodeChunk::addBytes(char *bytes, S32 size)
127 { 127 {
128 mCodeChunk = new U8[size]; 128 mCodeChunk = new U8[size];
129 } 129 }
130 memcpy(mCodeChunk + mCurrentOffset, bytes, size); 130 memcpy(mCodeChunk + mCurrentOffset, bytes, size); /*Flawfinder: ignore*/
131 mCurrentOffset += size; 131 mCurrentOffset += size;
132} 132}
133 133
@@ -136,7 +136,7 @@ void LLScriptByteCodeChunk::addBytes(S32 size)
136 if (mCodeChunk) 136 if (mCodeChunk)
137 { 137 {
138 U8 *temp = new U8[mCurrentOffset + size]; 138 U8 *temp = new U8[mCurrentOffset + size];
139 memcpy(temp, mCodeChunk, mCurrentOffset); 139 memcpy(temp, mCodeChunk, mCurrentOffset); /*Flawfinder: ignore*/
140 delete [] mCodeChunk; 140 delete [] mCodeChunk;
141 mCodeChunk = temp; 141 mCodeChunk = temp;
142 } 142 }
@@ -153,7 +153,7 @@ void LLScriptByteCodeChunk::addBytesDontInc(S32 size)
153 if (mCodeChunk) 153 if (mCodeChunk)
154 { 154 {
155 U8 *temp = new U8[mCurrentOffset + size]; 155 U8 *temp = new U8[mCurrentOffset + size];
156 memcpy(temp, mCodeChunk, mCurrentOffset); 156 memcpy(temp, mCodeChunk, mCurrentOffset); /*Flawfinder: ignore*/
157 delete [] mCodeChunk; 157 delete [] mCodeChunk;
158 mCodeChunk = temp; 158 mCodeChunk = temp;
159 } 159 }
@@ -256,7 +256,7 @@ void LLScriptScriptCodeChunk::build(FILE *efp, FILE *bcfp)
256 mCompleteCode = new U8[mTotalSize]; 256 mCompleteCode = new U8[mTotalSize];
257 memset(mCompleteCode, 0, mTotalSize); 257 memset(mCompleteCode, 0, mTotalSize);
258 258
259 memcpy(mCompleteCode, mRegisters->mCodeChunk, mRegisters->mCurrentOffset); 259 memcpy(mCompleteCode, mRegisters->mCodeChunk, mRegisters->mCurrentOffset);
260 offset += mRegisters->mCurrentOffset; 260 offset += mRegisters->mCurrentOffset;
261 261
262 set_register(mCompleteCode, LREG_IP, 0); 262 set_register(mCompleteCode, LREG_IP, 0);
@@ -267,12 +267,12 @@ void LLScriptScriptCodeChunk::build(FILE *efp, FILE *bcfp)
267 267
268 set_register(mCompleteCode, LREG_GVR, offset); 268 set_register(mCompleteCode, LREG_GVR, offset);
269 269
270 memcpy(mCompleteCode + offset, mGlobalVariables->mCodeChunk, mGlobalVariables->mCurrentOffset); 270 memcpy(mCompleteCode + offset, mGlobalVariables->mCodeChunk, mGlobalVariables->mCurrentOffset); /*Flawfinder: ignore*/
271 offset += mGlobalVariables->mCurrentOffset; 271 offset += mGlobalVariables->mCurrentOffset;
272 272
273 set_register(mCompleteCode, LREG_GFR, offset); 273 set_register(mCompleteCode, LREG_GFR, offset);
274 274
275 memcpy(mCompleteCode + offset, mGlobalFunctions->mCodeChunk, mGlobalFunctions->mCurrentOffset); 275 memcpy(mCompleteCode + offset, mGlobalFunctions->mCodeChunk, mGlobalFunctions->mCurrentOffset); /*Flawfinder: ignore*/
276 offset += mGlobalFunctions->mCurrentOffset; 276 offset += mGlobalFunctions->mCurrentOffset;
277 277
278 set_register(mCompleteCode, LREG_SR, offset); 278 set_register(mCompleteCode, LREG_SR, offset);
@@ -291,12 +291,12 @@ void LLScriptScriptCodeChunk::build(FILE *efp, FILE *bcfp)
291 } 291 }
292 set_event_register(mCompleteCode, LREG_ER, bytestream2u64(mStates->mCodeChunk, default_state_offset), LSL2_CURRENT_MAJOR_VERSION); 292 set_event_register(mCompleteCode, LREG_ER, bytestream2u64(mStates->mCodeChunk, default_state_offset), LSL2_CURRENT_MAJOR_VERSION);
293 293
294 memcpy(mCompleteCode + offset, mStates->mCodeChunk, mStates->mCurrentOffset); 294 memcpy(mCompleteCode + offset, mStates->mCodeChunk, mStates->mCurrentOffset); /*Flawfinder: ignore*/
295 offset += mStates->mCurrentOffset; 295 offset += mStates->mCurrentOffset;
296 296
297 set_register(mCompleteCode, LREG_HR, offset); 297 set_register(mCompleteCode, LREG_HR, offset);
298 298
299 memcpy(mCompleteCode + offset, mHeap->mCodeChunk, mHeap->mCurrentOffset); 299 memcpy(mCompleteCode + offset, mHeap->mCodeChunk, mHeap->mCurrentOffset); /*Flawfinder: ignore*/
300 offset += mHeap->mCurrentOffset; 300 offset += mHeap->mCurrentOffset;
301 301
302 set_register(mCompleteCode, LREG_HP, offset); 302 set_register(mCompleteCode, LREG_HP, offset);
diff --git a/linden/indra/lscript/lscript_compile/lscript_compile_fb_vc8.vcproj b/linden/indra/lscript/lscript_compile/lscript_compile_fb_vc8.vcproj
new file mode 100644
index 0000000..c61e6ec
--- /dev/null
+++ b/linden/indra/lscript/lscript_compile/lscript_compile_fb_vc8.vcproj
@@ -0,0 +1,106 @@
1<?xml version="1.0" encoding="Windows-1252"?>
2<VisualStudioProject
3 ProjectType="Visual C++"
4 Version="7.10"
5 Name="lscript_compile_fb"
6 ProjectGUID="{B771CF1B-E253-47BD-8B0A-6B0440CC9228}"
7 RootNamespace="lscript_compile_fb"
8 Keyword="MakeFileProj">
9 <Platforms>
10 <Platform
11 Name="Win32"/>
12 </Platforms>
13 <Configurations>
14 <Configuration
15 Name="Debug|Win32"
16 OutputDirectory="."
17 IntermediateDirectory="Debug_fb"
18 ConfigurationType="10">
19 <Tool
20 Name="VCCustomBuildTool"/>
21 <Tool
22 Name="VCMIDLTool"/>
23 <Tool
24 Name="VCPostBuildEventTool"/>
25 <Tool
26 Name="VCPreBuildEventTool"/>
27 </Configuration>
28 <Configuration
29 Name="Release|Win32"
30 OutputDirectory="."
31 IntermediateDirectory="Release_fb"
32 ConfigurationType="10">
33 <Tool
34 Name="VCCustomBuildTool"/>
35 <Tool
36 Name="VCMIDLTool"/>
37 <Tool
38 Name="VCPostBuildEventTool"/>
39 <Tool
40 Name="VCPreBuildEventTool"/>
41 </Configuration>
42 </Configurations>
43 <References>
44 </References>
45 <Files>
46 <Filter
47 Name="Source Files"
48 Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
49 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
50 </Filter>
51 <Filter
52 Name="Header Files"
53 Filter="h;hpp;hxx;hm;inl;inc;xsd"
54 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
55 </Filter>
56 <Filter
57 Name="Resource Files"
58 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
59 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
60 </Filter>
61 <File
62 RelativePath=".\indra.l">
63 <FileConfiguration
64 Name="Debug|Win32">
65 <Tool
66 Name="VCCustomBuildTool"
67 Description="Building lex_yy.cpp"
68 CommandLine="C:\cygwin\bin\flex.exe -olex_yy.cpp indra.l
69"
70 Outputs="lex_yy.cpp"/>
71 </FileConfiguration>
72 <FileConfiguration
73 Name="Release|Win32">
74 <Tool
75 Name="VCCustomBuildTool"
76 Description="Building lex_yy.cpp"
77 CommandLine="C:\cygwin\bin\flex.exe -olex_yy.cpp indra.l
78"
79 Outputs="lex_yy.cpp"/>
80 </FileConfiguration>
81 </File>
82 <File
83 RelativePath=".\indra.y">
84 <FileConfiguration
85 Name="Debug|Win32">
86 <Tool
87 Name="VCCustomBuildTool"
88 Description="Building ytab.cpp"
89 CommandLine="C:\cygwin\bin\bison.exe -o ytab.cpp -v -d indra.y
90"
91 Outputs="ytab.cpp;ytab.h"/>
92 </FileConfiguration>
93 <FileConfiguration
94 Name="Release|Win32">
95 <Tool
96 Name="VCCustomBuildTool"
97 Description="Building ytab.cpp"
98 CommandLine="C:\cygwin\bin\bison.exe -y -d -v -o ytab.cpp indra.y
99C:\cygwin\bin\mv.exe ytab.hpp ytab.h"
100 Outputs="ytab.cpp;ytab.h"/>
101 </FileConfiguration>
102 </File>
103 </Files>
104 <Globals>
105 </Globals>
106</VisualStudioProject>
diff --git a/linden/indra/lscript/lscript_compile/lscript_compile_ly.vcproj b/linden/indra/lscript/lscript_compile/lscript_compile_ly.vcproj
new file mode 100644
index 0000000..c324ed9
--- /dev/null
+++ b/linden/indra/lscript/lscript_compile/lscript_compile_ly.vcproj
@@ -0,0 +1,110 @@
1<?xml version="1.0" encoding="Windows-1252"?>
2<VisualStudioProject
3 ProjectType="Visual C++"
4 Version="7.10"
5 Name="lscript_compile_ly"
6 ProjectGUID="{FF8ECB70-C788-47D4-91BF-F88448AE8940}"
7 RootNamespace="lscript_compile_ly"
8 Keyword="MakeFileProj">
9 <Platforms>
10 <Platform
11 Name="Win32"/>
12 </Platforms>
13 <Configurations>
14 <Configuration
15 Name="Debug|Win32"
16 OutputDirectory="."
17 IntermediateDirectory="Debug_ly"
18 ConfigurationType="10">
19 <Tool
20 Name="VCCustomBuildTool"/>
21 <Tool
22 Name="VCMIDLTool"/>
23 <Tool
24 Name="VCPostBuildEventTool"/>
25 <Tool
26 Name="VCPreBuildEventTool"/>
27 </Configuration>
28 <Configuration
29 Name="Release|Win32"
30 OutputDirectory="."
31 IntermediateDirectory="Release_ly"
32 ConfigurationType="10">
33 <Tool
34 Name="VCCustomBuildTool"/>
35 <Tool
36 Name="VCMIDLTool"/>
37 <Tool
38 Name="VCPostBuildEventTool"/>
39 <Tool
40 Name="VCPreBuildEventTool"/>
41 </Configuration>
42 </Configurations>
43 <References>
44 </References>
45 <Files>
46 <Filter
47 Name="Source Files"
48 Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
49 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
50 </Filter>
51 <Filter
52 Name="Header Files"
53 Filter="h;hpp;hxx;hm;inl;inc;xsd"
54 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
55 </Filter>
56 <Filter
57 Name="Resource Files"
58 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
59 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
60 </Filter>
61 <File
62 RelativePath=".\indra.l">
63 <FileConfiguration
64 Name="Debug|Win32">
65 <Tool
66 Name="VCCustomBuildTool"
67 Description="Building lex_yy.cpp"
68 CommandLine="set ROOTDIR=..\..\..\libraries\i686-win32\mks
69..\..\..\libraries\i686-win32\mks\lex.exe -o lex_yy.cpp indra.l
70"
71 Outputs="lex_yy.cpp"/>
72 </FileConfiguration>
73 <FileConfiguration
74 Name="Release|Win32">
75 <Tool
76 Name="VCCustomBuildTool"
77 Description="Building lex_yy.cpp"
78 CommandLine="set ROOTDIR=..\..\..\libraries\i686-win32\mks
79..\..\..\libraries\i686-win32\mks\lex.exe -o lex_yy.cpp indra.l
80"
81 Outputs="lex_yy.cpp"/>
82 </FileConfiguration>
83 </File>
84 <File
85 RelativePath=".\indra.y">
86 <FileConfiguration
87 Name="Debug|Win32">
88 <Tool
89 Name="VCCustomBuildTool"
90 Description="Building ytab.cpp"
91 CommandLine="set ROOTDIR=..\..\..\libraries\i686-win32\mks
92..\..\..\libraries\i686-win32\mks\yacc.exe -o ytab.cpp -v -d indra.y
93"
94 Outputs="ytab.cpp;ytab.h"/>
95 </FileConfiguration>
96 <FileConfiguration
97 Name="Release|Win32">
98 <Tool
99 Name="VCCustomBuildTool"
100 Description="Building ytab.cpp"
101 CommandLine="set ROOTDIR=..\..\..\libraries\i686-win32\mks
102..\..\..\libraries\i686-win32\mks\yacc.exe -o ytab.cpp -v -d indra.y
103"
104 Outputs="ytab.cpp;ytab.h"/>
105 </FileConfiguration>
106 </File>
107 </Files>
108 <Globals>
109 </Globals>
110</VisualStudioProject>
diff --git a/linden/indra/lscript/lscript_compile/lscript_compile_ly_vc8.vcproj b/linden/indra/lscript/lscript_compile/lscript_compile_ly_vc8.vcproj
new file mode 100644
index 0000000..baa202a
--- /dev/null
+++ b/linden/indra/lscript/lscript_compile/lscript_compile_ly_vc8.vcproj
@@ -0,0 +1,131 @@
1<?xml version="1.0" encoding="Windows-1252"?>
2<VisualStudioProject
3 ProjectType="Visual C++"
4 Version="8.00"
5 Name="lscript_compile_ly"
6 ProjectGUID="{FF8ECB70-C788-47D4-91BF-F88448AE8940}"
7 RootNamespace="lscript_compile_ly"
8 Keyword="MakeFileProj"
9 >
10 <Platforms>
11 <Platform
12 Name="Win32"
13 />
14 </Platforms>
15 <ToolFiles>
16 </ToolFiles>
17 <Configurations>
18 <Configuration
19 Name="Debug|Win32"
20 OutputDirectory="."
21 IntermediateDirectory="Debug_ly"
22 ConfigurationType="10"
23 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
24 >
25 <Tool
26 Name="VCPreBuildEventTool"
27 />
28 <Tool
29 Name="VCCustomBuildTool"
30 />
31 <Tool
32 Name="VCMIDLTool"
33 />
34 <Tool
35 Name="VCPostBuildEventTool"
36 />
37 </Configuration>
38 <Configuration
39 Name="Release|Win32"
40 OutputDirectory="."
41 IntermediateDirectory="Release_ly"
42 ConfigurationType="10"
43 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
44 >
45 <Tool
46 Name="VCPreBuildEventTool"
47 />
48 <Tool
49 Name="VCCustomBuildTool"
50 />
51 <Tool
52 Name="VCMIDLTool"
53 />
54 <Tool
55 Name="VCPostBuildEventTool"
56 />
57 </Configuration>
58 </Configurations>
59 <References>
60 </References>
61 <Files>
62 <Filter
63 Name="Source Files"
64 Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
65 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
66 >
67 </Filter>
68 <Filter
69 Name="Header Files"
70 Filter="h;hpp;hxx;hm;inl;inc;xsd"
71 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
72 >
73 </Filter>
74 <Filter
75 Name="Resource Files"
76 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
77 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
78 >
79 </Filter>
80 <File
81 RelativePath=".\indra.l"
82 >
83 <FileConfiguration
84 Name="Debug|Win32"
85 >
86 <Tool
87 Name="VCCustomBuildTool"
88 Description="Building lex_yy.cpp"
89 CommandLine="set ROOTDIR=..\..\..\libraries\i686-win32\mks&#x0D;&#x0A;..\..\..\libraries\i686-win32\mks\lex.exe -o lex_yy.cpp indra.l&#x0D;&#x0A;"
90 Outputs="lex_yy.cpp"
91 />
92 </FileConfiguration>
93 <FileConfiguration
94 Name="Release|Win32"
95 >
96 <Tool
97 Name="VCCustomBuildTool"
98 Description="Building lex_yy.cpp"
99 CommandLine="set ROOTDIR=..\..\..\libraries\i686-win32\mks&#x0D;&#x0A;..\..\..\libraries\i686-win32\mks\lex.exe -o lex_yy.cpp indra.l&#x0D;&#x0A;"
100 Outputs="lex_yy.cpp"
101 />
102 </FileConfiguration>
103 </File>
104 <File
105 RelativePath=".\indra.y"
106 >
107 <FileConfiguration
108 Name="Debug|Win32"
109 >
110 <Tool
111 Name="VCCustomBuildTool"
112 Description="Building ytab.cpp"
113 CommandLine="set ROOTDIR=..\..\..\libraries\i686-win32\mks&#x0D;&#x0A;..\..\..\libraries\i686-win32\mks\yacc.exe -o ytab.cpp -v -d indra.y&#x0D;&#x0A;"
114 Outputs="ytab.cpp;ytab.h"
115 />
116 </FileConfiguration>
117 <FileConfiguration
118 Name="Release|Win32"
119 >
120 <Tool
121 Name="VCCustomBuildTool"
122 Description="Building ytab.cpp"
123 CommandLine="set ROOTDIR=..\..\..\libraries\i686-win32\mks&#x0D;&#x0A;..\..\..\libraries\i686-win32\mks\yacc.exe -o ytab.cpp -v -d indra.y&#x0D;&#x0A;"
124 Outputs="ytab.cpp;ytab.h"
125 />
126 </FileConfiguration>
127 </File>
128 </Files>
129 <Globals>
130 </Globals>
131</VisualStudioProject>
diff --git a/linden/indra/lscript/lscript_compile/lscript_compile_vc8.vcproj b/linden/indra/lscript/lscript_compile/lscript_compile_vc8.vcproj
new file mode 100644
index 0000000..1427015
--- /dev/null
+++ b/linden/indra/lscript/lscript_compile/lscript_compile_vc8.vcproj
@@ -0,0 +1,329 @@
1<?xml version="1.0" encoding="Windows-1252"?>
2<VisualStudioProject
3 ProjectType="Visual C++"
4 Version="8.00"
5 Name="lscript_compile"
6 ProjectGUID="{44CE6D82-7320-4609-8FC3-5965C19F4808}"
7 RootNamespace="lscript_compile"
8 Keyword="Win32Proj"
9 >
10 <Platforms>
11 <Platform
12 Name="Win32"
13 />
14 </Platforms>
15 <ToolFiles>
16 </ToolFiles>
17 <Configurations>
18 <Configuration
19 Name="Debug|Win32"
20 OutputDirectory="../../lib_$(ConfigurationName)/i686-win32"
21 IntermediateDirectory="Debug"
22 ConfigurationType="4"
23 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
24 CharacterSet="1"
25 >
26 <Tool
27 Name="VCPreBuildEventTool"
28 />
29 <Tool
30 Name="VCCustomBuildTool"
31 />
32 <Tool
33 Name="VCXMLDataGeneratorTool"
34 />
35 <Tool
36 Name="VCWebServiceProxyGeneratorTool"
37 />
38 <Tool
39 Name="VCMIDLTool"
40 />
41 <Tool
42 Name="VCCLCompilerTool"
43 Optimization="0"
44 AdditionalIncludeDirectories="..;..\..\llcommon;..\..\llmath;..\..\llvfs;..\..\llmessage;..\..\llinventory;&quot;..\..\..\libraries\i686-win32\include&quot;;..\..\..\libraries\include"
45 PreprocessorDefinitions="WIN32;_DEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_DEBUG"
46 MinimalRebuild="true"
47 BasicRuntimeChecks="3"
48 RuntimeLibrary="1"
49 StructMemberAlignment="4"
50 TreatWChar_tAsBuiltInType="false"
51 ForceConformanceInForLoopScope="true"
52 UsePrecompiledHeader="0"
53 WarningLevel="3"
54 WarnAsError="true"
55 Detect64BitPortabilityProblems="false"
56 DebugInformationFormat="4"
57 />
58 <Tool
59 Name="VCManagedResourceCompilerTool"
60 />
61 <Tool
62 Name="VCResourceCompilerTool"
63 />
64 <Tool
65 Name="VCPreLinkEventTool"
66 />
67 <Tool
68 Name="VCLibrarianTool"
69 OutputFile="$(OutDir)/lscript_compile.lib"
70 />
71 <Tool
72 Name="VCALinkTool"
73 />
74 <Tool
75 Name="VCXDCMakeTool"
76 />
77 <Tool
78 Name="VCBscMakeTool"
79 />
80 <Tool
81 Name="VCFxCopTool"
82 />
83 <Tool
84 Name="VCPostBuildEventTool"
85 />
86 </Configuration>
87 <Configuration
88 Name="Release|Win32"
89 OutputDirectory="../../lib_$(ConfigurationName)/i686-win32"
90 IntermediateDirectory="Release"
91 ConfigurationType="4"
92 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
93 CharacterSet="1"
94 >
95 <Tool
96 Name="VCPreBuildEventTool"
97 />
98 <Tool
99 Name="VCCustomBuildTool"
100 />
101 <Tool
102 Name="VCXMLDataGeneratorTool"
103 />
104 <Tool
105 Name="VCWebServiceProxyGeneratorTool"
106 />
107 <Tool
108 Name="VCMIDLTool"
109 />
110 <Tool
111 Name="VCCLCompilerTool"
112 AdditionalIncludeDirectories="..;..\..\llcommon;..\..\llmath;..\..\llvfs;..\..\llmessage;..\..\llinventory;&quot;..\..\..\libraries\i686-win32\include&quot;;..\..\..\libraries\include"
113 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE"
114 RuntimeLibrary="0"
115 StructMemberAlignment="0"
116 TreatWChar_tAsBuiltInType="false"
117 ForceConformanceInForLoopScope="true"
118 UsePrecompiledHeader="0"
119 WarningLevel="3"
120 WarnAsError="true"
121 Detect64BitPortabilityProblems="false"
122 DebugInformationFormat="3"
123 />
124 <Tool
125 Name="VCManagedResourceCompilerTool"
126 />
127 <Tool
128 Name="VCResourceCompilerTool"
129 />
130 <Tool
131 Name="VCPreLinkEventTool"
132 />
133 <Tool
134 Name="VCLibrarianTool"
135 OutputFile="$(OutDir)/lscript_compile.lib"
136 />
137 <Tool
138 Name="VCALinkTool"
139 />
140 <Tool
141 Name="VCXDCMakeTool"
142 />
143 <Tool
144 Name="VCBscMakeTool"
145 />
146 <Tool
147 Name="VCFxCopTool"
148 />
149 <Tool
150 Name="VCPostBuildEventTool"
151 />
152 </Configuration>
153 <Configuration
154 Name="ReleaseNoOpt|Win32"
155 OutputDirectory="../../lib_$(ConfigurationName)/i686-win32"
156 IntermediateDirectory="$(ConfigurationName)"
157 ConfigurationType="4"
158 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
159 CharacterSet="1"
160 >
161 <Tool
162 Name="VCPreBuildEventTool"
163 />
164 <Tool
165 Name="VCCustomBuildTool"
166 />
167 <Tool
168 Name="VCXMLDataGeneratorTool"
169 />
170 <Tool
171 Name="VCWebServiceProxyGeneratorTool"
172 />
173 <Tool
174 Name="VCMIDLTool"
175 />
176 <Tool
177 Name="VCCLCompilerTool"
178 Optimization="0"
179 AdditionalIncludeDirectories="..;..\..\llcommon;..\..\llmath;..\..\llvfs;..\..\llmessage;..\..\llinventory;&quot;..\..\..\libraries\i686-win32\include&quot;;..\..\..\libraries\include"
180 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE"
181 RuntimeLibrary="0"
182 StructMemberAlignment="0"
183 TreatWChar_tAsBuiltInType="false"
184 ForceConformanceInForLoopScope="true"
185 UsePrecompiledHeader="0"
186 WarningLevel="3"
187 WarnAsError="true"
188 Detect64BitPortabilityProblems="false"
189 DebugInformationFormat="3"
190 />
191 <Tool
192 Name="VCManagedResourceCompilerTool"
193 />
194 <Tool
195 Name="VCResourceCompilerTool"
196 />
197 <Tool
198 Name="VCPreLinkEventTool"
199 />
200 <Tool
201 Name="VCLibrarianTool"
202 OutputFile="$(OutDir)/lscript_compile.lib"
203 />
204 <Tool
205 Name="VCALinkTool"
206 />
207 <Tool
208 Name="VCXDCMakeTool"
209 />
210 <Tool
211 Name="VCBscMakeTool"
212 />
213 <Tool
214 Name="VCFxCopTool"
215 />
216 <Tool
217 Name="VCPostBuildEventTool"
218 />
219 </Configuration>
220 </Configurations>
221 <References>
222 </References>
223 <Files>
224 <Filter
225 Name="Source Files"
226 Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
227 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
228 >
229 <File
230 RelativePath=".\lex_yy.cpp"
231 >
232 </File>
233 <File
234 RelativePath=".\lscript_alloc.cpp"
235 >
236 </File>
237 <File
238 RelativePath=".\lscript_bytecode.cpp"
239 >
240 </File>
241 <File
242 RelativePath=".\lscript_error.cpp"
243 >
244 </File>
245 <File
246 RelativePath=".\lscript_heap.cpp"
247 >
248 </File>
249 <File
250 RelativePath=".\lscript_resource.cpp"
251 >
252 </File>
253 <File
254 RelativePath=".\lscript_scope.cpp"
255 >
256 </File>
257 <File
258 RelativePath=".\lscript_tree.cpp"
259 >
260 </File>
261 <File
262 RelativePath=".\lscript_typecheck.cpp"
263 >
264 </File>
265 <File
266 RelativePath=".\ytab.cpp"
267 >
268 <FileConfiguration
269 Name="Release|Win32"
270 >
271 <Tool
272 Name="VCCLCompilerTool"
273 CompileAs="2"
274 />
275 </FileConfiguration>
276 </File>
277 </Filter>
278 <Filter
279 Name="Header Files"
280 Filter="h;hpp;hxx;hm;inl;inc;xsd"
281 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
282 >
283 <File
284 RelativePath=".\generated_lex_yy.hpp"
285 >
286 </File>
287 <File
288 RelativePath=".\generated_ytab.hpp"
289 >
290 </File>
291 <File
292 RelativePath=".\lscript_bytecode.h"
293 >
294 </File>
295 <File
296 RelativePath=".\lscript_error.h"
297 >
298 </File>
299 <File
300 RelativePath=".\lscript_heap.h"
301 >
302 </File>
303 <File
304 RelativePath=".\lscript_resource.h"
305 >
306 </File>
307 <File
308 RelativePath=".\lscript_scope.h"
309 >
310 </File>
311 <File
312 RelativePath=".\lscript_tree.h"
313 >
314 </File>
315 <File
316 RelativePath=".\lscript_typecheck.h"
317 >
318 </File>
319 </Filter>
320 <Filter
321 Name="Resource Files"
322 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
323 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
324 >
325 </Filter>
326 </Files>
327 <Globals>
328 </Globals>
329</VisualStudioProject>
diff --git a/linden/indra/lscript/lscript_compile/lscript_error.cpp b/linden/indra/lscript/lscript_compile/lscript_error.cpp
index d9f4d49..5ec50d3 100644
--- a/linden/indra/lscript/lscript_compile/lscript_error.cpp
+++ b/linden/indra/lscript/lscript_compile/lscript_error.cpp
@@ -45,13 +45,13 @@ void LLScriptFilePosition::fdotabs(FILE *fp, S32 tabs, S32 tabsize)
45 } 45 }
46} 46}
47 47
48char *gWarningText[LSWARN_EOF] = 48char* gWarningText[LSWARN_EOF] = /*Flawfinder: ignore*/
49{ 49{
50 "INVALID", 50 "INVALID",
51 "Dead code found beyond return statement" 51 "Dead code found beyond return statement"
52}; 52};
53 53
54char *gErrorText[LSERROR_EOF] = 54char* gErrorText[LSERROR_EOF] = /*Flawfinder: ignore*/
55{ 55{
56 "INVALID", 56 "INVALID",
57 "Syntax error", 57 "Syntax error",
diff --git a/linden/indra/lscript/lscript_compile/lscript_heap.cpp b/linden/indra/lscript/lscript_compile/lscript_heap.cpp
index 4adf84a..2cbd6bb 100644
--- a/linden/indra/lscript/lscript_compile/lscript_heap.cpp
+++ b/linden/indra/lscript/lscript_compile/lscript_heap.cpp
@@ -53,9 +53,9 @@ LLScriptHeapEntry::~LLScriptHeapEntry()
53 53
54void LLScriptHeapEntry::addString(char *string) 54void LLScriptHeapEntry::addString(char *string)
55{ 55{
56 S32 size = strlen(string) + 1; 56 S32 size = strlen(string) + 1; /*Flawfinder: ignore*/
57 S32 offset = 0; 57 S32 offset = 0;
58 memcpy(mData, string, size); 58 memcpy(mData, string, size); /*Flawfinder: ignore*/
59 mNext += size; 59 mNext += size;
60 integer2bytestream(mEntry, offset, mNext); 60 integer2bytestream(mEntry, offset, mNext);
61 mRefCount++; 61 mRefCount++;
diff --git a/linden/indra/lscript/lscript_compile/lscript_scope.h b/linden/indra/lscript/lscript_compile/lscript_scope.h
index ff20ad3..62fef88 100644
--- a/linden/indra/lscript/lscript_compile/lscript_scope.h
+++ b/linden/indra/lscript/lscript_compile/lscript_scope.h
@@ -45,7 +45,7 @@ typedef enum e_lscript_identifier_type
45 LIT_EOF 45 LIT_EOF
46} LSCRIPTIdentifierType; 46} LSCRIPTIdentifierType;
47 47
48const char LSCRIPTFunctionTypeStrings[LST_EOF] = 48const char LSCRIPTFunctionTypeStrings[LST_EOF] = /*Flawfinder: ignore*/
49{ 49{
50 '0', 50 '0',
51 'i', 51 'i',
@@ -58,7 +58,7 @@ const char LSCRIPTFunctionTypeStrings[LST_EOF] =
58 '0' 58 '0'
59}; 59};
60 60
61const char * const LSCRIPTListDescription[LST_EOF] = 61const char * const LSCRIPTListDescription[LST_EOF] = /*Flawfinder: ignore*/
62{ 62{
63 "PUSHARGB 0", 63 "PUSHARGB 0",
64 "PUSHARGB 1", 64 "PUSHARGB 1",
@@ -71,7 +71,7 @@ const char * const LSCRIPTListDescription[LST_EOF] =
71 "PUSHARGB 0" 71 "PUSHARGB 0"
72}; 72};
73 73
74const char * const LSCRIPTTypePush[LST_EOF] = 74const char * const LSCRIPTTypePush[LST_EOF] = /*Flawfinder: ignore*/
75{ 75{
76 "INVALID", 76 "INVALID",
77 "PUSHE", 77 "PUSHE",
@@ -84,7 +84,7 @@ const char * const LSCRIPTTypePush[LST_EOF] =
84 "undefined" 84 "undefined"
85}; 85};
86 86
87const char * const LSCRIPTTypeReturn[LST_EOF] = 87const char * const LSCRIPTTypeReturn[LST_EOF] = /*Flawfinder: ignore*/
88{ 88{
89 "INVALID", 89 "INVALID",
90 "LOADP -12", 90 "LOADP -12",
@@ -97,7 +97,7 @@ const char * const LSCRIPTTypeReturn[LST_EOF] =
97 "undefined" 97 "undefined"
98}; 98};
99 99
100const char * const LSCRIPTTypePop[LST_EOF] = 100const char * const LSCRIPTTypePop[LST_EOF] = /*Flawfinder: ignore*/
101{ 101{
102 "INVALID", 102 "INVALID",
103 "POP", 103 "POP",
@@ -110,7 +110,7 @@ const char * const LSCRIPTTypePop[LST_EOF] =
110 "undefined" 110 "undefined"
111}; 111};
112 112
113const char * const LSCRIPTTypeDuplicate[LST_EOF] = 113const char * const LSCRIPTTypeDuplicate[LST_EOF] = /*Flawfinder: ignore*/
114{ 114{
115 "INVALID", 115 "INVALID",
116 "DUP", 116 "DUP",
@@ -123,7 +123,7 @@ const char * const LSCRIPTTypeDuplicate[LST_EOF] =
123 "undefined" 123 "undefined"
124}; 124};
125 125
126const char * const LSCRIPTTypeLocalStore[LST_EOF] = 126const char * const LSCRIPTTypeLocalStore[LST_EOF] = /*Flawfinder: ignore*/
127{ 127{
128 "INVALID", 128 "INVALID",
129 "STORE ", 129 "STORE ",
@@ -136,7 +136,7 @@ const char * const LSCRIPTTypeLocalStore[LST_EOF] =
136 "undefined" 136 "undefined"
137}; 137};
138 138
139const char * const LSCRIPTTypeLocalDeclaration[LST_EOF] = 139const char * const LSCRIPTTypeLocalDeclaration[LST_EOF] = /*Flawfinder: ignore*/
140{ 140{
141 "INVALID", 141 "INVALID",
142 "STOREP ", 142 "STOREP ",
@@ -149,7 +149,7 @@ const char * const LSCRIPTTypeLocalDeclaration[LST_EOF] =
149 "undefined" 149 "undefined"
150}; 150};
151 151
152const char * const LSCRIPTTypeGlobalStore[LST_EOF] = 152const char * const LSCRIPTTypeGlobalStore[LST_EOF] = /*Flawfinder: ignore*/
153{ 153{
154 "INVALID", 154 "INVALID",
155 "STOREG ", 155 "STOREG ",
@@ -162,7 +162,7 @@ const char * const LSCRIPTTypeGlobalStore[LST_EOF] =
162 "undefined" 162 "undefined"
163}; 163};
164 164
165const char * const LSCRIPTTypeLocalPush[LST_EOF] = 165const char * const LSCRIPTTypeLocalPush[LST_EOF] = /*Flawfinder: ignore*/
166{ 166{
167 "INVALID", 167 "INVALID",
168 "PUSH ", 168 "PUSH ",
@@ -175,7 +175,7 @@ const char * const LSCRIPTTypeLocalPush[LST_EOF] =
175 "undefined" 175 "undefined"
176}; 176};
177 177
178const char * const LSCRIPTTypeLocalPush1[LST_EOF] = 178const char * const LSCRIPTTypeLocalPush1[LST_EOF] = /*Flawfinder: ignore*/
179{ 179{
180 "INVALID", 180 "INVALID",
181 "PUSHARGI 1", 181 "PUSHARGI 1",
@@ -188,7 +188,7 @@ const char * const LSCRIPTTypeLocalPush1[LST_EOF] =
188 "undefined" 188 "undefined"
189}; 189};
190 190
191const char * const LSCRIPTTypeGlobalPush[LST_EOF] = 191const char * const LSCRIPTTypeGlobalPush[LST_EOF] = /*Flawfinder: ignore*/
192{ 192{
193 "INVALID", 193 "INVALID",
194 "PUSHG ", 194 "PUSHG ",
@@ -213,7 +213,7 @@ public:
213 { 213 {
214 if (!mString) 214 if (!mString)
215 return LST_NULL; 215 return LST_NULL;
216 S32 length = (S32)strlen(mString); 216 S32 length = (S32)strlen(mString); /*Flawfinder: ignore*/
217 if (count >= length) 217 if (count >= length)
218 { 218 {
219 return LST_NULL; 219 return LST_NULL;
@@ -244,9 +244,9 @@ public:
244 S32 count = 0; 244 S32 count = 0;
245 if (mString) 245 if (mString)
246 { 246 {
247 count = (S32)strlen(mString); 247 count = (S32)strlen(mString); /*Flawfinder: ignore*/
248 char *temp = new char[count + 2]; 248 char *temp = new char[count + 2];
249 memcpy(temp, mString, count); 249 memcpy(temp, mString, count); /*Flawfinder: ignore*/
250 delete [] mString; 250 delete [] mString;
251 mString = temp; 251 mString = temp;
252 mString[count + 1] = 0; 252 mString[count + 1] = 0;
@@ -262,7 +262,7 @@ public:
262 S32 getNumber() 262 S32 getNumber()
263 { 263 {
264 if (mString) 264 if (mString)
265 return (S32)strlen(mString); 265 return (S32)strlen(mString); /*Flawfinder: ignore*/
266 else 266 else
267 return 0; 267 return 0;
268 } 268 }
diff --git a/linden/indra/lscript/lscript_compile/lscript_tree.cpp b/linden/indra/lscript/lscript_compile/lscript_tree.cpp
index bda09dd..0812ed5 100644
--- a/linden/indra/lscript/lscript_compile/lscript_tree.cpp
+++ b/linden/indra/lscript/lscript_compile/lscript_tree.cpp
@@ -270,7 +270,7 @@ void LLScriptConstantString::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCom
270 break; 270 break;
271 case LSCP_EMIT_ASSEMBLY: 271 case LSCP_EMIT_ASSEMBLY:
272 fprintf(fp, "PUSHARGS \"%s\"\n", mValue); 272 fprintf(fp, "PUSHARGS \"%s\"\n", mValue);
273 fprintf(fp, "STACKTOS %lu\n", strlen(mValue) + 1); 273 fprintf(fp, "STACKTOS %lu\n", strlen(mValue) + 1); /*Flawfinder: ignore*/
274 break; 274 break;
275 case LSCP_TYPE: 275 case LSCP_TYPE:
276 type = mType; 276 type = mType;
@@ -290,7 +290,7 @@ void LLScriptConstantString::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCom
290 case LSCP_TO_STACK: 290 case LSCP_TO_STACK:
291 { 291 {
292 chunk->addByte(LSCRIPTOpCodes[LOPC_PUSHARGS]); 292 chunk->addByte(LSCRIPTOpCodes[LOPC_PUSHARGS]);
293 chunk->addBytes(mValue, (S32)strlen(mValue) + 1); 293 chunk->addBytes(mValue, (S32)strlen(mValue) + 1); /*Flawfinder: ignore*/
294 type = mType; 294 type = mType;
295 } 295 }
296 break; 296 break;
@@ -310,7 +310,7 @@ void LLScriptConstantString::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCom
310 310
311S32 LLScriptConstantString::getSize() 311S32 LLScriptConstantString::getSize()
312{ 312{
313 return (S32)strlen(mValue) + 1; 313 return (S32)strlen(mValue) + 1; /*Flawfinder: ignore*/
314} 314}
315 315
316 316
@@ -1161,7 +1161,7 @@ void LLScriptGlobalVariable::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCom
1161 // it also includes the name of the variable as well as the type 1161 // it also includes the name of the variable as well as the type
1162 // plus 4 bytes of offset from it's apparent address to the actual data 1162 // plus 4 bytes of offset from it's apparent address to the actual data
1163#ifdef LSL_INCLUDE_DEBUG_INFO 1163#ifdef LSL_INCLUDE_DEBUG_INFO
1164 count += strlen(mIdentifier->mName) + 1 + 1 + 4; 1164 count += strlen(mIdentifier->mName) + 1 + 1 + 4; /*Flawfinder: ignore*/
1165#else 1165#else
1166 count += 1 + 1 + 4; 1166 count += 1 + 1 + 4;
1167#endif 1167#endif
@@ -1184,7 +1184,7 @@ void LLScriptGlobalVariable::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCom
1184 chunk->addBytes(&vtype, 1); 1184 chunk->addBytes(&vtype, 1);
1185 // null terminated name 1185 // null terminated name
1186#ifdef LSL_INCLUDE_DEBUG_INFO 1186#ifdef LSL_INCLUDE_DEBUG_INFO
1187 chunk->addBytes(mIdentifier->mName, strlen(mIdentifier->mName) + 1); 1187 chunk->addBytes(mIdentifier->mName, strlen(mIdentifier->mName) + 1); /*Flawfinder: ignore*/
1188#else 1188#else
1189 chunk->addBytes(1); 1189 chunk->addBytes(1);
1190#endif 1190#endif
@@ -1315,7 +1315,7 @@ void LLScriptStateEntryEvent::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCo
1315 { 1315 {
1316#ifdef LSL_INCLUDE_DEBUG_INFO 1316#ifdef LSL_INCLUDE_DEBUG_INFO
1317 char name[] = "state_entry"; 1317 char name[] = "state_entry";
1318 chunk->addBytes(name, strlen(name) + 1); 1318 chunk->addBytes(name, strlen(name) + 1); /*Flawfinder: ignore*/
1319#endif 1319#endif
1320 } 1320 }
1321 break; 1321 break;
@@ -1351,7 +1351,7 @@ void LLScriptStateExitEvent::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCom
1351 { 1351 {
1352#ifdef LSL_INCLUDE_DEBUG_INFO 1352#ifdef LSL_INCLUDE_DEBUG_INFO
1353 char name[] = "state_exit"; 1353 char name[] = "state_exit";
1354 chunk->addBytes(name, strlen(name) + 1); 1354 chunk->addBytes(name, strlen(name) + 1); /*Flawfinder: ignore*/
1355#endif 1355#endif
1356 } 1356 }
1357 break; 1357 break;
@@ -1409,8 +1409,8 @@ void LLScriptTouchStartEvent::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCo
1409 { 1409 {
1410#ifdef LSL_INCLUDE_DEBUG_INFO 1410#ifdef LSL_INCLUDE_DEBUG_INFO
1411 char name[] = "touch_start"; 1411 char name[] = "touch_start";
1412 chunk->addBytes(name, strlen(name) + 1); 1412 chunk->addBytes(name, strlen(name) + 1); /*Flawfinder: ignore*/
1413 chunk->addBytes(mCount->mName, strlen(mCount->mName) + 1); 1413 chunk->addBytes(mCount->mName, strlen(mCount->mName) + 1); /*Flawfinder: ignore*/
1414#endif 1414#endif
1415 } 1415 }
1416 break; 1416 break;
@@ -1467,8 +1467,8 @@ void LLScriptTouchEvent::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompile
1467 { 1467 {
1468#ifdef LSL_INCLUDE_DEBUG_INFO 1468#ifdef LSL_INCLUDE_DEBUG_INFO
1469 char name[] = "touch"; 1469 char name[] = "touch";
1470 chunk->addBytes(name, strlen(name) + 1); 1470 chunk->addBytes(name, strlen(name) + 1); /*Flawfinder: ignore*/
1471 chunk->addBytes(mCount->mName, strlen(mCount->mName) + 1); 1471 chunk->addBytes(mCount->mName, strlen(mCount->mName) + 1); /*Flawfinder: ignore*/
1472#endif 1472#endif
1473 } 1473 }
1474 break; 1474 break;
@@ -1525,8 +1525,8 @@ void LLScriptTouchEndEvent::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTComp
1525 { 1525 {
1526#ifdef LSL_INCLUDE_DEBUG_INFO 1526#ifdef LSL_INCLUDE_DEBUG_INFO
1527 char name[] = "touch_end"; 1527 char name[] = "touch_end";
1528 chunk->addBytes(name, strlen(name) + 1); 1528 chunk->addBytes(name, strlen(name) + 1); /*Flawfinder: ignore*/
1529 chunk->addBytes(mCount->mName, strlen(mCount->mName) + 1); 1529 chunk->addBytes(mCount->mName, strlen(mCount->mName) + 1); /*Flawfinder: ignore*/
1530#endif 1530#endif
1531 } 1531 }
1532 break; 1532 break;
@@ -1583,8 +1583,8 @@ void LLScriptCollisionStartEvent::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRI
1583 { 1583 {
1584#ifdef LSL_INCLUDE_DEBUG_INFO 1584#ifdef LSL_INCLUDE_DEBUG_INFO
1585 char name[] = "collision_start"; 1585 char name[] = "collision_start";
1586 chunk->addBytes(name, (S32)strlen(name) + 1); 1586 chunk->addBytes(name, (S32)strlen(name) + 1); /*Flawfinder: ignore*/
1587 chunk->addBytes(mCount->mName, (S32)strlen(mCount->mName) + 1); 1587 chunk->addBytes(mCount->mName, (S32)strlen(mCount->mName) + 1); /*Flawfinder: ignore*/
1588#endif 1588#endif
1589 } 1589 }
1590 break; 1590 break;
@@ -1641,8 +1641,8 @@ void LLScriptCollisionEvent::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCom
1641 { 1641 {
1642#ifdef LSL_INCLUDE_DEBUG_INFO 1642#ifdef LSL_INCLUDE_DEBUG_INFO
1643 char name[] = "collision"; 1643 char name[] = "collision";
1644 chunk->addBytes(name, strlen(name) + 1); 1644 chunk->addBytes(name, strlen(name) + 1); /*Flawfinder: ignore*/
1645 chunk->addBytes(mCount->mName, strlen(mCount->mName) + 1); 1645 chunk->addBytes(mCount->mName, strlen(mCount->mName) + 1); /*Flawfinder: ignore*/
1646#endif 1646#endif
1647 } 1647 }
1648 break; 1648 break;
@@ -1699,8 +1699,8 @@ void LLScriptCollisionEndEvent::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPT
1699 { 1699 {
1700#ifdef LSL_INCLUDE_DEBUG_INFO 1700#ifdef LSL_INCLUDE_DEBUG_INFO
1701 char name[] = "collision_end"; 1701 char name[] = "collision_end";
1702 chunk->addBytes(name, strlen(name) + 1); 1702 chunk->addBytes(name, strlen(name) + 1); /*Flawfinder: ignore*/
1703 chunk->addBytes(mCount->mName, strlen(mCount->mName) + 1); 1703 chunk->addBytes(mCount->mName, strlen(mCount->mName) + 1); /*Flawfinder: ignore*/
1704#endif 1704#endif
1705 } 1705 }
1706 break; 1706 break;
@@ -1756,8 +1756,8 @@ void LLScriptLandCollisionStartEvent::recurse(FILE *fp, S32 tabs, S32 tabsize, L
1756 { 1756 {
1757#ifdef LSL_INCLUDE_DEBUG_INFO 1757#ifdef LSL_INCLUDE_DEBUG_INFO
1758 char name[] = "land_collision_start"; 1758 char name[] = "land_collision_start";
1759 chunk->addBytes(name, strlen(name) + 1); 1759 chunk->addBytes(name, strlen(name) + 1); /*Flawfinder: ignore*/
1760 chunk->addBytes(mPosition->mName, strlen(mPosition->mName) + 1); 1760 chunk->addBytes(mPosition->mName, strlen(mPosition->mName) + 1); /*Flawfinder: ignore*/
1761#endif 1761#endif
1762 } 1762 }
1763 break; 1763 break;
@@ -1815,8 +1815,8 @@ void LLScriptLandCollisionEvent::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIP
1815 { 1815 {
1816#ifdef LSL_INCLUDE_DEBUG_INFO 1816#ifdef LSL_INCLUDE_DEBUG_INFO
1817 char name[] = "land_collision"; 1817 char name[] = "land_collision";
1818 chunk->addBytes(name, strlen(name) + 1); 1818 chunk->addBytes(name, strlen(name) + 1); /*Flawfinder: ignore*/
1819 chunk->addBytes(mPosition->mName, strlen(mPosition->mName) + 1); 1819 chunk->addBytes(mPosition->mName, strlen(mPosition->mName) + 1); /*Flawfinder: ignore*/
1820#endif 1820#endif
1821 } 1821 }
1822 break; 1822 break;
@@ -1872,9 +1872,9 @@ void LLScriptLandCollisionEndEvent::recurse(FILE *fp, S32 tabs, S32 tabsize, LSC
1872 case LSCP_EMIT_BYTE_CODE: 1872 case LSCP_EMIT_BYTE_CODE:
1873 { 1873 {
1874#ifdef LSL_INCLUDE_DEBUG_INFO 1874#ifdef LSL_INCLUDE_DEBUG_INFO
1875 char name[] = "land_collision_end"; 1875 char name[] = "land_collision_end"; /*Flawfinder: ignore*/
1876 chunk->addBytes(name, strlen(name) + 1); 1876 chunk->addBytes(name, strlen(name) + 1); /*Flawfinder: ignore*/
1877 chunk->addBytes(mPosition->mName, strlen(mPosition->mName) + 1); 1877 chunk->addBytes(mPosition->mName, strlen(mPosition->mName) + 1); /*Flawfinder: ignore*/
1878#endif 1878#endif
1879 } 1879 }
1880 break; 1880 break;
@@ -1931,8 +1931,8 @@ void LLScriptInventoryEvent::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCom
1931 { 1931 {
1932#ifdef LSL_INCLUDE_DEBUG_INFO 1932#ifdef LSL_INCLUDE_DEBUG_INFO
1933 char name[] = "changed"; 1933 char name[] = "changed";
1934 chunk->addBytes(name, strlen(name) + 1); 1934 chunk->addBytes(name, strlen(name) + 1); /*Flawfinder: ignore*/
1935 chunk->addBytes(mChange->mName, strlen(mChange->mName) + 1); 1935 chunk->addBytes(mChange->mName, strlen(mChange->mName) + 1); /*Flawfinder: ignore*/
1936#endif 1936#endif
1937 } 1937 }
1938 break; 1938 break;
@@ -1988,8 +1988,8 @@ void LLScriptAttachEvent::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompil
1988 { 1988 {
1989#ifdef LSL_INCLUDE_DEBUG_INFO 1989#ifdef LSL_INCLUDE_DEBUG_INFO
1990 char name[] = "attach"; 1990 char name[] = "attach";
1991 chunk->addBytes(name, strlen(name) + 1); 1991 chunk->addBytes(name, strlen(name) + 1); /*Flawfinder: ignore*/
1992 chunk->addBytes(mAttach->mName, strlen(mAttach->mName) + 1); 1992 chunk->addBytes(mAttach->mName, strlen(mAttach->mName) + 1); /*Flawfinder: ignore*/
1993#endif 1993#endif
1994 } 1994 }
1995 break; 1995 break;
@@ -2058,9 +2058,9 @@ void LLScriptDataserverEvent::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCo
2058 { 2058 {
2059#ifdef LSL_INCLUDE_DEBUG_INFO 2059#ifdef LSL_INCLUDE_DEBUG_INFO
2060 char name[] = "dataserver"; 2060 char name[] = "dataserver";
2061 chunk->addBytes(name, strlen(name) + 1); 2061 chunk->addBytes(name, strlen(name) + 1); /*Flawfinder: ignore*/
2062 chunk->addBytes(mID->mName, strlen(mID->mName) + 1); 2062 chunk->addBytes(mID->mName, strlen(mID->mName) + 1); /*Flawfinder: ignore*/
2063 chunk->addBytes(mData->mName, strlen(mData->mName) + 1); 2063 chunk->addBytes(mData->mName, strlen(mData->mName) + 1); /*Flawfinder: ignore*/
2064#endif 2064#endif
2065 } 2065 }
2066 break; 2066 break;
@@ -2096,7 +2096,7 @@ void LLScriptTimerEvent::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompile
2096 { 2096 {
2097#ifdef LSL_INCLUDE_DEBUG_INFO 2097#ifdef LSL_INCLUDE_DEBUG_INFO
2098 char name[] = "timer"; 2098 char name[] = "timer";
2099 chunk->addBytes(name, strlen(name) + 1); 2099 chunk->addBytes(name, strlen(name) + 1); /*Flawfinder: ignore*/
2100#endif 2100#endif
2101 } 2101 }
2102 break; 2102 break;
@@ -2127,7 +2127,7 @@ void LLScriptMovingStartEvent::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTC
2127 { 2127 {
2128#ifdef LSL_INCLUDE_DEBUG_INFO 2128#ifdef LSL_INCLUDE_DEBUG_INFO
2129 char name[] = "moving_start"; 2129 char name[] = "moving_start";
2130 chunk->addBytes(name, strlen(name) + 1); 2130 chunk->addBytes(name, strlen(name) + 1); /*Flawfinder: ignore*/
2131#endif 2131#endif
2132 } 2132 }
2133 break; 2133 break;
@@ -2158,7 +2158,7 @@ void LLScriptMovingEndEvent::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCom
2158 { 2158 {
2159#ifdef LSL_INCLUDE_DEBUG_INFO 2159#ifdef LSL_INCLUDE_DEBUG_INFO
2160 char name[] = "moving_end"; 2160 char name[] = "moving_end";
2161 chunk->addBytes(name, strlen(name) + 1); 2161 chunk->addBytes(name, strlen(name) + 1); /*Flawfinder: ignore*/
2162#endif 2162#endif
2163 } 2163 }
2164 break; 2164 break;
@@ -2212,8 +2212,8 @@ void LLScriptRTPEvent::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePa
2212 { 2212 {
2213#ifdef LSL_INCLUDE_DEBUG_INFO 2213#ifdef LSL_INCLUDE_DEBUG_INFO
2214 char name[] = "chat"; 2214 char name[] = "chat";
2215 chunk->addBytes(name, strlen(name) + 1); 2215 chunk->addBytes(name, strlen(name) + 1); /*Flawfinder: ignore*/
2216 chunk->addBytes(mRTPermissions->mName, strlen(mRTPermissions->mName) + 1); 2216 chunk->addBytes(mRTPermissions->mName, strlen(mRTPermissions->mName) + 1); /*Flawfinder: ignore*/
2217#endif 2217#endif
2218 } 2218 }
2219 break; 2219 break;
@@ -2308,11 +2308,11 @@ void LLScriptChatEvent::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompileP
2308 { 2308 {
2309#ifdef LSL_INCLUDE_DEBUG_INFO 2309#ifdef LSL_INCLUDE_DEBUG_INFO
2310 char name[] = "chat"; 2310 char name[] = "chat";
2311 chunk->addBytes(name, strlen(name) + 1); 2311 chunk->addBytes(name, strlen(name) + 1); /*Flawfinder: ignore*/
2312 chunk->addBytes(mChannel->mName, strlen(mChannel->mName) + 1); 2312 chunk->addBytes(mChannel->mName, strlen(mChannel->mName) + 1); /*Flawfinder: ignore*/
2313 chunk->addBytes(mName->mName, strlen(mName->mName) + 1); 2313 chunk->addBytes(mName->mName, strlen(mName->mName) + 1); /*Flawfinder: ignore*/
2314 chunk->addBytes(mID->mName, strlen(mID->mName) + 1); 2314 chunk->addBytes(mID->mName, strlen(mID->mName) + 1); /*Flawfinder: ignore*/
2315 chunk->addBytes(mMessage->mName, strlen(mMessage->mName) + 1); 2315 chunk->addBytes(mMessage->mName, strlen(mMessage->mName) + 1); /*Flawfinder: ignore*/
2316#endif 2316#endif
2317 } 2317 }
2318 break; 2318 break;
@@ -2371,8 +2371,8 @@ void LLScriptSensorEvent::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompil
2371 { 2371 {
2372#ifdef LSL_INCLUDE_DEBUG_INFO 2372#ifdef LSL_INCLUDE_DEBUG_INFO
2373 char name[] = "sensor"; 2373 char name[] = "sensor";
2374 chunk->addBytes(name, strlen(name) + 1); 2374 chunk->addBytes(name, strlen(name) + 1); /*Flawfinder: ignore*/
2375 chunk->addBytes(mNumber->mName, strlen(mNumber->mName) + 1); 2375 chunk->addBytes(mNumber->mName, strlen(mNumber->mName) + 1); /*Flawfinder: ignore*/
2376#endif 2376#endif
2377 } 2377 }
2378 break; 2378 break;
@@ -2428,8 +2428,8 @@ void LLScriptObjectRezEvent::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCom
2428 { 2428 {
2429#ifdef LSL_INCLUDE_DEBUG_INFO 2429#ifdef LSL_INCLUDE_DEBUG_INFO
2430 char name[] = "sensor"; 2430 char name[] = "sensor";
2431 chunk->addBytes(name, strlen(name) + 1); 2431 chunk->addBytes(name, strlen(name) + 1); /*Flawfinder: ignore*/
2432 chunk->addBytes(mID->mName, strlen(mID->mName) + 1); 2432 chunk->addBytes(mID->mName, strlen(mID->mName) + 1); /*Flawfinder: ignore*/
2433#endif 2433#endif
2434 } 2434 }
2435 break; 2435 break;
@@ -2511,10 +2511,10 @@ void LLScriptControlEvent::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompi
2511 { 2511 {
2512#ifdef LSL_INCLUDE_DEBUG_INFO 2512#ifdef LSL_INCLUDE_DEBUG_INFO
2513 char name[] = "control"; 2513 char name[] = "control";
2514 chunk->addBytes(name, strlen(name) + 1); 2514 chunk->addBytes(name, strlen(name) + 1); /*Flawfinder: ignore*/
2515 chunk->addBytes(mName->mName, strlen(mName->mName) + 1); 2515 chunk->addBytes(mName->mName, strlen(mName->mName) + 1); /*Flawfinder: ignore*/
2516 chunk->addBytes(mLevels->mName, strlen(mLevels->mName) + 1); 2516 chunk->addBytes(mLevels->mName, strlen(mLevels->mName) + 1); /*Flawfinder: ignore*/
2517 chunk->addBytes(mEdges->mName, strlen(mEdges->mName) + 1); 2517 chunk->addBytes(mEdges->mName, strlen(mEdges->mName) + 1); /*Flawfinder: ignore*/
2518#endif 2518#endif
2519 } 2519 }
2520 break; 2520 break;
@@ -2611,11 +2611,11 @@ void LLScriptLinkMessageEvent::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTC
2611 { 2611 {
2612#ifdef LSL_INCLUDE_DEBUG_INFO 2612#ifdef LSL_INCLUDE_DEBUG_INFO
2613 char name[] = "link_message"; 2613 char name[] = "link_message";
2614 chunk->addBytes(name, strlen(name) + 1); 2614 chunk->addBytes(name, strlen(name) + 1); /*Flawfinder: ignore*/
2615 chunk->addBytes(mSender->mName, strlen(mSender->mName) + 1); 2615 chunk->addBytes(mSender->mName, strlen(mSender->mName) + 1); /*Flawfinder: ignore*/
2616 chunk->addBytes(mNum->mName, strlen(mNum->mName) + 1); 2616 chunk->addBytes(mNum->mName, strlen(mNum->mName) + 1); /*Flawfinder: ignore*/
2617 chunk->addBytes(mStr->mName, strlen(mStr->mName) + 1); 2617 chunk->addBytes(mStr->mName, strlen(mStr->mName) + 1); /*Flawfinder: ignore*/
2618 chunk->addBytes(mID->mName, strlen(mID->mName) + 1); 2618 chunk->addBytes(mID->mName, strlen(mID->mName) + 1); /*Flawfinder: ignore*/
2619#endif 2619#endif
2620 } 2620 }
2621 break; 2621 break;
@@ -2739,13 +2739,13 @@ void LLScriptRemoteEvent::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompil
2739 { 2739 {
2740#ifdef LSL_INCLUDE_DEBUG_INFO 2740#ifdef LSL_INCLUDE_DEBUG_INFO
2741 char name[] = "remote_event"; 2741 char name[] = "remote_event";
2742 chunk->addBytes(name, strlen(name) + 1); 2742 chunk->addBytes(name, strlen(name) + 1); /*Flawfinder: ignore*/
2743 chunk->addBytes(mType->mName, strlen(mType->mName) + 1); 2743 chunk->addBytes(mType->mName, strlen(mType->mName) + 1); /*Flawfinder: ignore*/
2744 chunk->addBytes(mChannel->mName, strlen(mChannel->mName) + 1); 2744 chunk->addBytes(mChannel->mName, strlen(mChannel->mName) + 1); /*Flawfinder: ignore*/
2745 chunk->addBytes(mMessageID->mName, strlen(mMessageID->mName) + 1); 2745 chunk->addBytes(mMessageID->mName, strlen(mMessageID->mName) + 1); /*Flawfinder: ignore*/
2746 chunk->addBytes(mSender->mName, strlen(mSender->mName) + 1); 2746 chunk->addBytes(mSender->mName, strlen(mSender->mName) + 1); /*Flawfinder: ignore*/
2747 chunk->addBytes(mIntVal->mName, strlen(mIntVal->mName) + 1); 2747 chunk->addBytes(mIntVal->mName, strlen(mIntVal->mName) + 1); /*Flawfinder: ignore*/
2748 chunk->addBytes(mStrVal->mName, strlen(mStrVal->mName) + 1); 2748 chunk->addBytes(mStrVal->mName, strlen(mStrVal->mName) + 1); /*Flawfinder: ignore*/
2749#endif 2749#endif
2750 } 2750 }
2751 break; 2751 break;
@@ -2854,11 +2854,11 @@ void LLScriptHTTPResponseEvent::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPT
2854 { 2854 {
2855#ifdef LSL_INCLUDE_DEBUG_INFO 2855#ifdef LSL_INCLUDE_DEBUG_INFO
2856 char name[] = "http_response"; 2856 char name[] = "http_response";
2857 chunk->addBytes(name, strlen(name) + 1); 2857 chunk->addBytes(name, strlen(name) + 1); /*Flawfinder: ignore*/
2858 chunk->addBytes(mRequestId->mName, strlen(mRequestId->mName) + 1); 2858 chunk->addBytes(mRequestId->mName, strlen(mRequestId->mName) + 1); /*Flawfinder: ignore*/
2859 chunk->addBytes(mStatus->mName, strlen(mStatus->mName) + 1); 2859 chunk->addBytes(mStatus->mName, strlen(mStatus->mName) + 1); /*Flawfinder: ignore*/
2860 chunk->addBytes(mMetadata->mName, strlen(mMetadata->mName) + 1); 2860 chunk->addBytes(mMetadata->mName, strlen(mMetadata->mName) + 1); /*Flawfinder: ignore*/
2861 chunk->addBytes(mBody->mName, strlen(mBody->mName) + 1); 2861 chunk->addBytes(mBody->mName, strlen(mBody->mName) + 1); /*Flawfinder: ignore*/
2862#endif 2862#endif
2863 } 2863 }
2864 break; 2864 break;
@@ -2932,9 +2932,9 @@ void LLScriptMoneyEvent::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompile
2932 { 2932 {
2933#ifdef LSL_INCLUDE_DEBUG_INFO 2933#ifdef LSL_INCLUDE_DEBUG_INFO
2934 char name[] = "money"; 2934 char name[] = "money";
2935 chunk->addBytes(name, strlen(name) + 1); 2935 chunk->addBytes(name, strlen(name) + 1); /*Flawfinder: ignore*/
2936 chunk->addBytes(mName->mName, strlen(mName->mName) + 1); 2936 chunk->addBytes(mName->mName, strlen(mName->mName) + 1); /*Flawfinder: ignore*/
2937 chunk->addBytes(mAmount->mName, strlen(mAmount->mName) + 1); 2937 chunk->addBytes(mAmount->mName, strlen(mAmount->mName) + 1); /*Flawfinder: ignore*/
2938#endif 2938#endif
2939 } 2939 }
2940 break; 2940 break;
@@ -3043,12 +3043,12 @@ void LLScriptEmailEvent::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompile
3043 { 3043 {
3044#ifdef LSL_INCLUDE_DEBUG_INFO 3044#ifdef LSL_INCLUDE_DEBUG_INFO
3045 char name[] = "email"; 3045 char name[] = "email";
3046 chunk->addBytes(name, strlen(name) + 1); 3046 chunk->addBytes(name, strlen(name) + 1); /*Flawfinder: ignore*/
3047 chunk->addBytes(mTime->mName, strlen(mTime->mName) + 1); 3047 chunk->addBytes(mTime->mName, strlen(mTime->mName) + 1); /*Flawfinder: ignore*/
3048 chunk->addBytes(mAddress->mName, strlen(mAddress->mName) + 1); 3048 chunk->addBytes(mAddress->mName, strlen(mAddress->mName) + 1); /*Flawfinder: ignore*/
3049 chunk->addBytes(mSubject->mName, strlen(mSubject->mName) + 1); 3049 chunk->addBytes(mSubject->mName, strlen(mSubject->mName) + 1); /*Flawfinder: ignore*/
3050 chunk->addBytes(mBody->mName, strlen(mBody->mName) + 1); 3050 chunk->addBytes(mBody->mName, strlen(mBody->mName) + 1); /*Flawfinder: ignore*/
3051 chunk->addBytes(mNumber->mName, strlen(mNumber->mName) + 1); 3051 chunk->addBytes(mNumber->mName, strlen(mNumber->mName) + 1); /*Flawfinder: ignore*/
3052#endif 3052#endif
3053 } 3053 }
3054 break; 3054 break;
@@ -3108,8 +3108,8 @@ void LLScriptRezEvent::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePa
3108 { 3108 {
3109#ifdef LSL_INCLUDE_DEBUG_INFO 3109#ifdef LSL_INCLUDE_DEBUG_INFO
3110 char name[] = "rez"; 3110 char name[] = "rez";
3111 chunk->addBytes(name, strlen(name) + 1); 3111 chunk->addBytes(name, strlen(name) + 1); /*Flawfinder: ignore*/
3112 chunk->addBytes(mStartParam->mName, strlen(mStartParam->mName) + 1); 3112 chunk->addBytes(mStartParam->mName, strlen(mStartParam->mName) + 1); /*Flawfinder: ignore*/
3113#endif 3113#endif
3114 } 3114 }
3115 break; 3115 break;
@@ -3144,7 +3144,7 @@ void LLScriptNoSensorEvent::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTComp
3144 { 3144 {
3145#ifdef LSL_INCLUDE_DEBUG_INFO 3145#ifdef LSL_INCLUDE_DEBUG_INFO
3146 char name[] = "no_sensor"; 3146 char name[] = "no_sensor";
3147 chunk->addBytes(name, strlen(name) + 1); 3147 chunk->addBytes(name, strlen(name) + 1); /*Flawfinder: ignore*/
3148#endif 3148#endif
3149 } 3149 }
3150 break; 3150 break;
@@ -3223,11 +3223,11 @@ void LLScriptAtTarget::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePa
3223 case LSCP_EMIT_BYTE_CODE: 3223 case LSCP_EMIT_BYTE_CODE:
3224 { 3224 {
3225#ifdef LSL_INCLUDE_DEBUG_INFO 3225#ifdef LSL_INCLUDE_DEBUG_INFO
3226 char name[] = "at_target"; 3226 char name[] = "at_target"; /*Flawfinder: ignore*/
3227 chunk->addBytes(name, strlen(name) + 1); 3227 chunk->addBytes(name, strlen(name) + 1); /*Flawfinder: ignore*/
3228 chunk->addBytes(mTargetNumber->mName, strlen(mTargetNumber->mName) + 1); 3228 chunk->addBytes(mTargetNumber->mName, strlen(mTargetNumber->mName) + 1); /*Flawfinder: ignore*/
3229 chunk->addBytes(mTargetPosition->mName, strlen(mTargetPosition->mName) + 1); 3229 chunk->addBytes(mTargetPosition->mName, strlen(mTargetPosition->mName) + 1); /*Flawfinder: ignore*/
3230 chunk->addBytes(mOurPosition->mName, strlen(mOurPosition->mName) + 1); 3230 chunk->addBytes(mOurPosition->mName, strlen(mOurPosition->mName) + 1); /*Flawfinder: ignore*/
3231#endif 3231#endif
3232 } 3232 }
3233 break; 3233 break;
@@ -3265,8 +3265,8 @@ void LLScriptNotAtTarget::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompil
3265 case LSCP_EMIT_BYTE_CODE: 3265 case LSCP_EMIT_BYTE_CODE:
3266 { 3266 {
3267#ifdef LSL_INCLUDE_DEBUG_INFO 3267#ifdef LSL_INCLUDE_DEBUG_INFO
3268 char name[] = "not_at_target"; 3268 char name[] = "not_at_target"; /*Flawfinder: ignore*/
3269 chunk->addBytes(name, strlen(name) + 1); 3269 chunk->addBytes(name, strlen(name) + 1); /*Flawfinder: ignore*/
3270#endif 3270#endif
3271 } 3271 }
3272 break; 3272 break;
@@ -3346,10 +3346,10 @@ void LLScriptAtRotTarget::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompil
3346 { 3346 {
3347#ifdef LSL_INCLUDE_DEBUG_INFO 3347#ifdef LSL_INCLUDE_DEBUG_INFO
3348 char name[] = "at_rot_target"; 3348 char name[] = "at_rot_target";
3349 chunk->addBytes(name, strlen(name) + 1); 3349 chunk->addBytes(name, strlen(name) + 1); /*Flawfinder: ignore*/
3350 chunk->addBytes(mTargetNumber->mName, strlen(mTargetNumber->mName) + 1); 3350 chunk->addBytes(mTargetNumber->mName, strlen(mTargetNumber->mName) + 1); /*Flawfinder: ignore*/
3351 chunk->addBytes(mTargetRotation->mName, strlen(mTargetRotation->mName) + 1); 3351 chunk->addBytes(mTargetRotation->mName, strlen(mTargetRotation->mName) + 1); /*Flawfinder: ignore*/
3352 chunk->addBytes(mOurRotation->mName, strlen(mOurRotation->mName) + 1); 3352 chunk->addBytes(mOurRotation->mName, strlen(mOurRotation->mName) + 1); /*Flawfinder: ignore*/
3353#endif 3353#endif
3354 } 3354 }
3355 break; 3355 break;
@@ -3388,7 +3388,7 @@ void LLScriptNotAtRotTarget::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCom
3388 { 3388 {
3389#ifdef LSL_INCLUDE_DEBUG_INFO 3389#ifdef LSL_INCLUDE_DEBUG_INFO
3390 char name[] = "not_at_rot_target"; 3390 char name[] = "not_at_rot_target";
3391 chunk->addBytes(name, strlen(name) + 1); 3391 chunk->addBytes(name, strlen(name) + 1); /*Flawfinder: ignore*/
3392#endif 3392#endif
3393 } 3393 }
3394 break; 3394 break;
@@ -7143,7 +7143,7 @@ void LLScriptFunctionCall::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompi
7143 gErrorToText.writeError(fp, this, LSERROR_FUNCTION_TYPE_ERROR); 7143 gErrorToText.writeError(fp, this, LSERROR_FUNCTION_TYPE_ERROR);
7144 } 7144 }
7145 } 7145 }
7146 else if (argcount != strlen(mIdentifier->mScopeEntry->mFunctionArgs.mString)) 7146 else if (argcount != strlen(mIdentifier->mScopeEntry->mFunctionArgs.mString)) /*Flawfinder: ignore*/
7147 { 7147 {
7148 gErrorToText.writeError(fp, this, LSERROR_FUNCTION_TYPE_ERROR); 7148 gErrorToText.writeError(fp, this, LSERROR_FUNCTION_TYPE_ERROR);
7149 } 7149 }
@@ -7459,7 +7459,7 @@ void add_exit_pops(LLScriptByteCodeChunk *chunk, LLScriptScopeEntry *entry)
7459 7459
7460 if (entry->mLocals.mString) 7460 if (entry->mLocals.mString)
7461 { 7461 {
7462 number = (S32)strlen(entry->mLocals.mString); 7462 number = (S32)strlen(entry->mLocals.mString); /*Flawfinder: ignore*/
7463 for (i = number - 1; i >= 0; i--) 7463 for (i = number - 1; i >= 0; i--)
7464 { 7464 {
7465 switch(entry->mLocals.getType(i)) 7465 switch(entry->mLocals.getType(i))
@@ -7492,7 +7492,7 @@ void add_exit_pops(LLScriptByteCodeChunk *chunk, LLScriptScopeEntry *entry)
7492 7492
7493 if (entry->mFunctionArgs.mString) 7493 if (entry->mFunctionArgs.mString)
7494 { 7494 {
7495 number = (S32)strlen(entry->mFunctionArgs.mString); 7495 number = (S32)strlen(entry->mFunctionArgs.mString); /*Flawfinder: ignore*/
7496 for (i = number - 1; i >= 0; i--) 7496 for (i = number - 1; i >= 0; i--)
7497 { 7497 {
7498 switch(entry->mFunctionArgs.getType(i)) 7498 switch(entry->mFunctionArgs.getType(i))
@@ -7531,7 +7531,7 @@ void print_exit_pops(FILE *fp, LLScriptScopeEntry *entry)
7531 7531
7532 if (entry->mLocals.mString) 7532 if (entry->mLocals.mString)
7533 { 7533 {
7534 number = (S32)strlen(entry->mLocals.mString); 7534 number = (S32)strlen(entry->mLocals.mString); /*Flawfinder: ignore*/
7535 for (i = number - 1; i >= 0; i--) 7535 for (i = number - 1; i >= 0; i--)
7536 { 7536 {
7537 fprintf(fp, "%s", LSCRIPTTypePop[entry->mLocals.getType(i)]); 7537 fprintf(fp, "%s", LSCRIPTTypePop[entry->mLocals.getType(i)]);
@@ -7540,7 +7540,7 @@ void print_exit_pops(FILE *fp, LLScriptScopeEntry *entry)
7540 7540
7541 if (entry->mFunctionArgs.mString) 7541 if (entry->mFunctionArgs.mString)
7542 { 7542 {
7543 number = (S32)strlen(entry->mFunctionArgs.mString); 7543 number = (S32)strlen(entry->mFunctionArgs.mString); /*Flawfinder: ignore*/
7544 for (i = number - 1; i >= 0; i--) 7544 for (i = number - 1; i >= 0; i--)
7545 { 7545 {
7546 fprintf(fp, "%s", LSCRIPTTypePop[entry->mFunctionArgs.getType(i)]); 7546 fprintf(fp, "%s", LSCRIPTTypePop[entry->mFunctionArgs.getType(i)]);
@@ -7985,8 +7985,8 @@ void LLScriptIf::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pas
7985 break; 7985 break;
7986 case LSCP_EMIT_BYTE_CODE: 7986 case LSCP_EMIT_BYTE_CODE:
7987 { 7987 {
7988 char jumpname[32]; 7988 char jumpname[32]; /*Flawfinder: ignore*/
7989 sprintf(jumpname, "##Temp Jump %d##", gTempJumpCount++); 7989 snprintf(jumpname, sizeof(jumpname),"##Temp Jump %d##", gTempJumpCount++); /*Flawfinder: ignore*/
7990 7990
7991 mExpression->recurse(fp, tabs, tabsize, LSCP_TO_STACK, ptype, prunearg, scope, type, basetype, count, chunk, heap, stacksize, entry, entrycount, NULL); 7991 mExpression->recurse(fp, tabs, tabsize, LSCP_TO_STACK, ptype, prunearg, scope, type, basetype, count, chunk, heap, stacksize, entry, entrycount, NULL);
7992 chunk->addByte(LSCRIPTOpCodes[LOPC_JUMPNIF]); 7992 chunk->addByte(LSCRIPTOpCodes[LOPC_JUMPNIF]);
@@ -8066,10 +8066,10 @@ void LLScriptIfElse::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass
8066 break; 8066 break;
8067 case LSCP_EMIT_BYTE_CODE: 8067 case LSCP_EMIT_BYTE_CODE:
8068 { 8068 {
8069 char jumpname1[32]; 8069 char jumpname1[32]; /*Flawfinder: ignore*/
8070 sprintf(jumpname1, "##Temp Jump %d##", gTempJumpCount++); 8070 snprintf(jumpname1, sizeof(jumpname1), "##Temp Jump %d##", gTempJumpCount++); /*Flawfinder: ignore*/
8071 char jumpname2[32]; 8071 char jumpname2[32]; /*Flawfinder: ignore*/
8072 sprintf(jumpname2, "##Temp Jump %d##", gTempJumpCount++); 8072 snprintf(jumpname2, sizeof(jumpname2), "##Temp Jump %d##", gTempJumpCount++); /*Flawfinder: ignore*/
8073 8073
8074 mExpression->recurse(fp, tabs, tabsize, LSCP_TO_STACK, ptype, prunearg, scope, type, basetype, count, chunk, heap, stacksize, entry, entrycount, NULL); 8074 mExpression->recurse(fp, tabs, tabsize, LSCP_TO_STACK, ptype, prunearg, scope, type, basetype, count, chunk, heap, stacksize, entry, entrycount, NULL);
8075 chunk->addByte(LSCRIPTOpCodes[LOPC_JUMPNIF]); 8075 chunk->addByte(LSCRIPTOpCodes[LOPC_JUMPNIF]);
@@ -8169,10 +8169,10 @@ void LLScriptFor::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass pa
8169 break; 8169 break;
8170 case LSCP_EMIT_BYTE_CODE: 8170 case LSCP_EMIT_BYTE_CODE:
8171 { 8171 {
8172 char jumpname1[32]; 8172 char jumpname1[32]; /*Flawfinder: ignore*/
8173 sprintf(jumpname1, "##Temp Jump %d##", gTempJumpCount++); 8173 snprintf(jumpname1, sizeof(jumpname1), "##Temp Jump %d##", gTempJumpCount++); /*Flawfinder: ignore*/
8174 char jumpname2[32]; 8174 char jumpname2[32]; /*Flawfinder: ignore*/
8175 sprintf(jumpname2, "##Temp Jump %d##", gTempJumpCount++); 8175 snprintf(jumpname2, sizeof(jumpname2), "##Temp Jump %d##", gTempJumpCount++); /*Flawfinder: ignore*/
8176 8176
8177 if(mSequence) 8177 if(mSequence)
8178 mSequence->recurse(fp, tabs, tabsize, LSCP_TO_STACK, ptype, prunearg, scope, type, basetype, count, chunk, heap, stacksize, entry, entrycount, NULL); 8178 mSequence->recurse(fp, tabs, tabsize, LSCP_TO_STACK, ptype, prunearg, scope, type, basetype, count, chunk, heap, stacksize, entry, entrycount, NULL);
@@ -8266,8 +8266,8 @@ void LLScriptDoWhile::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePas
8266 break; 8266 break;
8267 case LSCP_EMIT_BYTE_CODE: 8267 case LSCP_EMIT_BYTE_CODE:
8268 { 8268 {
8269 char jumpname1[32]; 8269 char jumpname1[32]; /*Flawfinder: ignore*/
8270 sprintf(jumpname1, "##Temp Jump %d##", gTempJumpCount++); 8270 snprintf(jumpname1, sizeof(jumpname1), "##Temp Jump %d##", gTempJumpCount++); /*Flawfinder: ignore*/
8271 8271
8272 chunk->addLabel(jumpname1); 8272 chunk->addLabel(jumpname1);
8273 mStatement->recurse(fp, tabs, tabsize, pass, ptype, prunearg, scope, type, basetype, count, chunk, heap, stacksize, entry, entrycount, NULL); 8273 mStatement->recurse(fp, tabs, tabsize, pass, ptype, prunearg, scope, type, basetype, count, chunk, heap, stacksize, entry, entrycount, NULL);
@@ -8340,10 +8340,10 @@ void LLScriptWhile::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass
8340 break; 8340 break;
8341 case LSCP_EMIT_BYTE_CODE: 8341 case LSCP_EMIT_BYTE_CODE:
8342 { 8342 {
8343 char jumpname1[32]; 8343 char jumpname1[32]; /*Flawfinder: ignore*/
8344 sprintf(jumpname1, "##Temp Jump %d##", gTempJumpCount++); 8344 snprintf(jumpname1, sizeof(jumpname1), "##Temp Jump %d##", gTempJumpCount++); /*Flawfinder: ignore*/
8345 char jumpname2[32]; 8345 char jumpname2[32]; /*Flawfinder: ignore*/
8346 sprintf(jumpname2, "##Temp Jump %d##", gTempJumpCount++); 8346 snprintf(jumpname2, sizeof(jumpname2), "##Temp Jump %d##", gTempJumpCount++); /*Flawfinder: ignore*/
8347 8347
8348 chunk->addLabel(jumpname1); 8348 chunk->addLabel(jumpname1);
8349 mExpression->recurse(fp, tabs, tabsize, LSCP_TO_STACK, ptype, prunearg, scope, type, basetype, count, chunk, heap, stacksize, entry, entrycount, NULL); 8349 mExpression->recurse(fp, tabs, tabsize, LSCP_TO_STACK, ptype, prunearg, scope, type, basetype, count, chunk, heap, stacksize, entry, entrycount, NULL);
@@ -9018,7 +9018,7 @@ void LLScriptEventHandler::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompi
9018 fprintf(fp, ".method public hidebysig instance default void "); 9018 fprintf(fp, ".method public hidebysig instance default void ");
9019 9019
9020 // Mangle event handler name by prefixing it with state name. Allows state changing by finding handlers prefixed with new state name. 9020 // Mangle event handler name by prefixing it with state name. Allows state changing by finding handlers prefixed with new state name.
9021 fprintf(fp, entry->mIdentifier); 9021 fprintf(fp, entry->mIdentifier); /*Flawfinder: ignore*/
9022 9022
9023 // Handler name and arguments. 9023 // Handler name and arguments.
9024 mEventp->recurse(fp, tabs, tabsize, pass, ptype, prunearg, scope, type, basetype, count, chunk, heap, stacksize, entry, entrycount, NULL); 9024 mEventp->recurse(fp, tabs, tabsize, pass, ptype, prunearg, scope, type, basetype, count, chunk, heap, stacksize, entry, entrycount, NULL);
@@ -9154,7 +9154,7 @@ void LLScriptFunctionDec::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompil
9154 chunk->addBytes(&typereturn, 1); 9154 chunk->addBytes(&typereturn, 1);
9155 // name 9155 // name
9156#ifdef LSL_INCLUDE_DEBUG_INFO 9156#ifdef LSL_INCLUDE_DEBUG_INFO
9157 chunk->addBytes(mIdentifier->mName, strlen(mIdentifier->mName) + 1); 9157 chunk->addBytes(mIdentifier->mName, strlen(mIdentifier->mName) + 1); /*Flawfinder: ignore*/
9158#else 9158#else
9159 chunk->addBytes(1); 9159 chunk->addBytes(1);
9160#endif 9160#endif
@@ -9391,7 +9391,7 @@ void LLScriptGlobalFunctions::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCo
9391 9391
9392 // null terminated function name 9392 // null terminated function name
9393#ifdef LSL_INCLUDE_DEBUG_INFO 9393#ifdef LSL_INCLUDE_DEBUG_INFO
9394 chunk->addBytes(mIdentifier->mName, strlen(mIdentifier->mName) + 1); 9394 chunk->addBytes(mIdentifier->mName, strlen(mIdentifier->mName) + 1); /*Flawfinder: ignore*/
9395#else 9395#else
9396 chunk->addBytes(1); 9396 chunk->addBytes(1);
9397#endif 9397#endif
@@ -9642,7 +9642,7 @@ void LLScriptState::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass
9642 9642
9643 // null terminated state name 9643 // null terminated state name
9644#ifdef LSL_INCLUDE_DEBUG_INFO 9644#ifdef LSL_INCLUDE_DEBUG_INFO
9645 chunk->addBytes(mIdentifier->mName, strlen(mIdentifier->mName) + 1); 9645 chunk->addBytes(mIdentifier->mName, strlen(mIdentifier->mName) + 1); /*Flawfinder: ignore*/
9646#else 9646#else
9647 chunk->addBytes(1); 9647 chunk->addBytes(1);
9648#endif 9648#endif
@@ -9697,8 +9697,8 @@ LLScriptScript::LLScriptScript(LLScritpGlobalStorage *globals,
9697 mStates(states), mGlobalScope(NULL), mGlobals(NULL), mGlobalFunctions(NULL), mGodLike(FALSE) 9697 mStates(states), mGlobalScope(NULL), mGlobals(NULL), mGlobalFunctions(NULL), mGodLike(FALSE)
9698{ 9698{
9699 const char DEFAULT_BYTECODE_FILENAME[] = "lscript.lso"; 9699 const char DEFAULT_BYTECODE_FILENAME[] = "lscript.lso";
9700 strcpy(mBytecodeDest, DEFAULT_BYTECODE_FILENAME); 9700 strncpy(mBytecodeDest, DEFAULT_BYTECODE_FILENAME, sizeof(mBytecodeDest) -1); /*Flawfinder: ignore*/
9701 9701 mBytecodeDest[MAX_STRING-1] = '\0';
9702 LLScriptGlobalVariable *tvar; 9702 LLScriptGlobalVariable *tvar;
9703 LLScriptGlobalFunctions *tfunc; 9703 LLScriptGlobalFunctions *tfunc;
9704 LLScritpGlobalStorage *temp; 9704 LLScritpGlobalStorage *temp;
@@ -9744,7 +9744,7 @@ LLScriptScript::LLScriptScript(LLScritpGlobalStorage *globals,
9744 9744
9745void LLScriptScript::setBytecodeDest(const char* dst_filename) 9745void LLScriptScript::setBytecodeDest(const char* dst_filename)
9746{ 9746{
9747 strncpy(mBytecodeDest, dst_filename, MAX_STRING); 9747 strncpy(mBytecodeDest, dst_filename, MAX_STRING); /*Flawfinder: ignore*/
9748 mBytecodeDest[MAX_STRING-1] = '\0'; 9748 mBytecodeDest[MAX_STRING-1] = '\0';
9749} 9749}
9750 9750
@@ -9753,7 +9753,7 @@ void print_cil_globals(FILE* fp, LLScriptGlobalVariable* global)
9753 fprintf(fp, ".field private "); 9753 fprintf(fp, ".field private ");
9754 print_cil_type(fp, global->mType->mType); 9754 print_cil_type(fp, global->mType->mType);
9755 fprintf(fp, " "); 9755 fprintf(fp, " ");
9756 fprintf(fp, global->mIdentifier->mName); 9756 fprintf(fp, global->mIdentifier->mName); /*Flawfinder: ignore*/
9757 fprintf(fp, "\n"); 9757 fprintf(fp, "\n");
9758 if(NULL != global->mNextp) 9758 if(NULL != global->mNextp)
9759 { 9759 {
@@ -9932,7 +9932,7 @@ void LLScriptScript::recurse(FILE *fp, S32 tabs, S32 tabsize, LSCRIPTCompilePass
9932 9932
9933 // now, put it all together and spit it out 9933 // now, put it all together and spit it out
9934 // we need 9934 // we need
9935 FILE *bcfp = LLFile::fopen(mBytecodeDest, "wb"); 9935 FILE* bcfp = LLFile::fopen(mBytecodeDest, "wb"); /*Flawfinder: ignore*/
9936 9936
9937 code->build(fp, bcfp); 9937 code->build(fp, bcfp);
9938 fclose(bcfp); 9938 fclose(bcfp);
diff --git a/linden/indra/lscript/lscript_compile/lscript_tree.h b/linden/indra/lscript/lscript_compile/lscript_tree.h
index a535e76..11be92d 100644
--- a/linden/indra/lscript/lscript_compile/lscript_tree.h
+++ b/linden/indra/lscript/lscript_compile/lscript_tree.h
@@ -2267,7 +2267,7 @@ public:
2267 BOOL mGodLike; 2267 BOOL mGodLike;
2268 2268
2269private: 2269private:
2270 char mBytecodeDest[MAX_STRING]; 2270 char mBytecodeDest[MAX_STRING]; /*Flawfinder: ignore*/
2271}; 2271};
2272 2272
2273class LLScriptAllocationManager 2273class LLScriptAllocationManager
diff --git a/linden/indra/lscript/lscript_execute/lscript_execute.cpp b/linden/indra/lscript/lscript_execute/lscript_execute.cpp
index a81d706..b5d395e 100644
--- a/linden/indra/lscript/lscript_execute/lscript_execute.cpp
+++ b/linden/indra/lscript/lscript_execute/lscript_execute.cpp
@@ -39,7 +39,7 @@
39void (*binary_operations[LST_EOF][LST_EOF])(U8 *buffer, LSCRIPTOpCodesEnum opcode); 39void (*binary_operations[LST_EOF][LST_EOF])(U8 *buffer, LSCRIPTOpCodesEnum opcode);
40void (*unary_operations[LST_EOF])(U8 *buffer, LSCRIPTOpCodesEnum opcode); 40void (*unary_operations[LST_EOF])(U8 *buffer, LSCRIPTOpCodesEnum opcode);
41 41
42char *LSCRIPTRunTimeFaultStrings[LSRF_EOF] = 42char* LSCRIPTRunTimeFaultStrings[LSRF_EOF] = /*Flawfinder: ignore*/
43{ 43{
44 "invalid", // LSRF_INVALID, 44 "invalid", // LSRF_INVALID,
45 "Math Error", // LSRF_MATH, 45 "Math Error", // LSRF_MATH,
@@ -2596,6 +2596,7 @@ BOOL run_jump(U8 *buffer, S32 &offset, BOOL b_print, const LLUUID &id)
2596 offset += arg; 2596 offset += arg;
2597 return FALSE; 2597 return FALSE;
2598} 2598}
2599
2599BOOL run_jumpif(U8 *buffer, S32 &offset, BOOL b_print, const LLUUID &id) 2600BOOL run_jumpif(U8 *buffer, S32 &offset, BOOL b_print, const LLUUID &id)
2600{ 2601{
2601 if (b_print) 2602 if (b_print)
@@ -2648,8 +2649,10 @@ BOOL run_jumpif(U8 *buffer, S32 &offset, BOOL b_print, const LLUUID &id)
2648 else if (type == LST_STRING) 2649 else if (type == LST_STRING)
2649 { 2650 {
2650 S32 base_address = lscript_pop_int(buffer); 2651 S32 base_address = lscript_pop_int(buffer);
2651 // this bit of nastiness is to get around that code paths to local variables can result in lack of initialization 2652 // this bit of nastiness is to get around that code paths to
2652 // and function clean up of ref counts isn't based on scope (a mistake, I know) 2653 // local variables can result in lack of initialization and
2654 // function clean up of ref counts isn't based on scope (a
2655 // mistake, I know)
2653 S32 address = base_address + get_register(buffer, LREG_HR) - 1; 2656 S32 address = base_address + get_register(buffer, LREG_HR) - 1;
2654 if (address) 2657 if (address)
2655 { 2658 {
@@ -2662,7 +2665,7 @@ BOOL run_jumpif(U8 *buffer, S32 &offset, BOOL b_print, const LLUUID &id)
2662 S32 size = toffset - string; 2665 S32 size = toffset - string;
2663 char *sdata = new char[size]; 2666 char *sdata = new char[size];
2664 bytestream2char(sdata, buffer, string); 2667 bytestream2char(sdata, buffer, string);
2665 if (strlen(sdata)) 2668 if (strlen(sdata)) /*Flawfinder: ignore*/
2666 { 2669 {
2667 offset += arg; 2670 offset += arg;
2668 } 2671 }
@@ -2674,8 +2677,10 @@ BOOL run_jumpif(U8 *buffer, S32 &offset, BOOL b_print, const LLUUID &id)
2674 else if (type == LST_KEY) 2677 else if (type == LST_KEY)
2675 { 2678 {
2676 S32 base_address = lscript_pop_int(buffer); 2679 S32 base_address = lscript_pop_int(buffer);
2677 // this bit of nastiness is to get around that code paths to local variables can result in lack of initialization 2680 // this bit of nastiness is to get around that code paths to
2678 // and function clean up of ref counts isn't based on scope (a mistake, I know) 2681 // local variables can result in lack of initialization and
2682 // function clean up of ref counts isn't based on scope (a
2683 // mistake, I know)
2679 S32 address = base_address + get_register(buffer, LREG_HR) - 1; 2684 S32 address = base_address + get_register(buffer, LREG_HR) - 1;
2680 if (address) 2685 if (address)
2681 { 2686 {
@@ -2688,29 +2693,37 @@ BOOL run_jumpif(U8 *buffer, S32 &offset, BOOL b_print, const LLUUID &id)
2688 S32 size = toffset - string; 2693 S32 size = toffset - string;
2689 char *sdata = new char[size]; 2694 char *sdata = new char[size];
2690 bytestream2char(sdata, buffer, string); 2695 bytestream2char(sdata, buffer, string);
2691 if (strlen(sdata)) 2696 if (strlen(sdata)) /*Flawfinder: ignore*/
2692 { 2697 {
2693 LLUUID id; 2698 LLUUID id;
2694 id.set(sdata); 2699 if (id.set(sdata) && id.notNull())
2695 if (id != LLUUID::null)
2696 offset += arg; 2700 offset += arg;
2697 } 2701 }
2698 delete [] sdata; 2702 delete [] sdata;
2699 } 2703 }
2700 lsa_decrease_ref_count(buffer, base_address); 2704 lsa_decrease_ref_count(buffer, base_address);
2701 } 2705 }
2702 else if (type == LST_LIST) 2706 }
2707 else if (type == LST_LIST)
2708 {
2709 S32 base_address = lscript_pop_int(buffer);
2710 S32 address = base_address + get_register(buffer, LREG_HR) - 1;
2711 if (address)
2703 { 2712 {
2704 S32 address = lscript_pop_int(buffer); 2713 if (safe_heap_check_address(buffer, address + SIZEOF_SCRIPT_ALLOC_ENTRY, 1))
2705 LLScriptLibData *list = lsa_get_data(buffer, address, TRUE);
2706 if (list->getListLength())
2707 { 2714 {
2708 offset += arg; 2715 LLScriptLibData *list = lsa_get_list_ptr(buffer, base_address, TRUE);
2716 if (list && list->getListLength())
2717 {
2718 offset += arg;
2719 }
2720 delete list;
2709 } 2721 }
2710 } 2722 }
2711 } 2723 }
2712 return FALSE; 2724 return FALSE;
2713} 2725}
2726
2714BOOL run_jumpnif(U8 *buffer, S32 &offset, BOOL b_print, const LLUUID &id) 2727BOOL run_jumpnif(U8 *buffer, S32 &offset, BOOL b_print, const LLUUID &id)
2715{ 2728{
2716 if (b_print) 2729 if (b_print)
@@ -2763,8 +2776,10 @@ BOOL run_jumpnif(U8 *buffer, S32 &offset, BOOL b_print, const LLUUID &id)
2763 else if (type == LST_STRING) 2776 else if (type == LST_STRING)
2764 { 2777 {
2765 S32 base_address = lscript_pop_int(buffer); 2778 S32 base_address = lscript_pop_int(buffer);
2766 // this bit of nastiness is to get around that code paths to local variables can result in lack of initialization 2779 // this bit of nastiness is to get around that code paths to
2767 // and function clean up of ref counts isn't based on scope (a mistake, I know) 2780 // local variables can result in lack of initialization and
2781 // function clean up of ref counts isn't based on scope (a
2782 // mistake, I know)
2768 S32 address = base_address + get_register(buffer, LREG_HR) - 1; 2783 S32 address = base_address + get_register(buffer, LREG_HR) - 1;
2769 if (address) 2784 if (address)
2770 { 2785 {
@@ -2777,7 +2792,7 @@ BOOL run_jumpnif(U8 *buffer, S32 &offset, BOOL b_print, const LLUUID &id)
2777 S32 size = toffset - string; 2792 S32 size = toffset - string;
2778 char *sdata = new char[size]; 2793 char *sdata = new char[size];
2779 bytestream2char(sdata, buffer, string); 2794 bytestream2char(sdata, buffer, string);
2780 if (!strlen(sdata)) 2795 if (!strlen(sdata)) /*Flawfinder: ignore*/
2781 { 2796 {
2782 offset += arg; 2797 offset += arg;
2783 } 2798 }
@@ -2789,8 +2804,10 @@ BOOL run_jumpnif(U8 *buffer, S32 &offset, BOOL b_print, const LLUUID &id)
2789 else if (type == LST_KEY) 2804 else if (type == LST_KEY)
2790 { 2805 {
2791 S32 base_address = lscript_pop_int(buffer); 2806 S32 base_address = lscript_pop_int(buffer);
2792 // this bit of nastiness is to get around that code paths to local variables can result in lack of initialization 2807 // this bit of nastiness is to get around that code paths to
2793 // and function clean up of ref counts isn't based on scope (a mistake, I know) 2808 // local variables can result in lack of initialization and
2809 // function clean up of ref counts isn't based on scope (a
2810 // mistake, I know)
2794 S32 address = base_address + get_register(buffer, LREG_HR) - 1; 2811 S32 address = base_address + get_register(buffer, LREG_HR) - 1;
2795 if (address) 2812 if (address)
2796 { 2813 {
@@ -2803,11 +2820,10 @@ BOOL run_jumpnif(U8 *buffer, S32 &offset, BOOL b_print, const LLUUID &id)
2803 S32 size = toffset - string; 2820 S32 size = toffset - string;
2804 char *sdata = new char[size]; 2821 char *sdata = new char[size];
2805 bytestream2char(sdata, buffer, string); 2822 bytestream2char(sdata, buffer, string);
2806 if (strlen(sdata)) 2823 if (strlen(sdata)) /*Flawfinder: ignore*/
2807 { 2824 {
2808 LLUUID id; 2825 LLUUID id;
2809 id.set(sdata); 2826 if (!id.set(sdata) || id.isNull())
2810 if (id == LLUUID::null)
2811 offset += arg; 2827 offset += arg;
2812 } 2828 }
2813 else 2829 else
@@ -2818,13 +2834,25 @@ BOOL run_jumpnif(U8 *buffer, S32 &offset, BOOL b_print, const LLUUID &id)
2818 } 2834 }
2819 lsa_decrease_ref_count(buffer, base_address); 2835 lsa_decrease_ref_count(buffer, base_address);
2820 } 2836 }
2821 else if (type == LST_LIST) 2837 }
2838 else if (type == LST_LIST)
2839 {
2840 S32 base_address = lscript_pop_int(buffer);
2841 // this bit of nastiness is to get around that code paths to
2842 // local variables can result in lack of initialization and
2843 // function clean up of ref counts isn't based on scope (a
2844 // mistake, I know)
2845 S32 address = base_address + get_register(buffer, LREG_HR) - 1;
2846 if (address)
2822 { 2847 {
2823 S32 address = lscript_pop_int(buffer); 2848 if (safe_heap_check_address(buffer, address + SIZEOF_SCRIPT_ALLOC_ENTRY, 1))
2824 LLScriptLibData *list = lsa_get_data(buffer, address, TRUE);
2825 if (!list->getListLength())
2826 { 2849 {
2827 offset += arg; 2850 LLScriptLibData *list = lsa_get_list_ptr(buffer, base_address, TRUE);
2851 if (!list || !list->getListLength())
2852 {
2853 offset += arg;
2854 }
2855 delete list;
2828 } 2856 }
2829 } 2857 }
2830 } 2858 }
@@ -2954,7 +2982,7 @@ S32 axtoi(char *hexStg)
2954 2982
2955BOOL run_cast(U8 *buffer, S32 &offset, BOOL b_print, const LLUUID &id) 2983BOOL run_cast(U8 *buffer, S32 &offset, BOOL b_print, const LLUUID &id)
2956{ 2984{
2957 char caststr[1024]; 2985 char caststr[1024]; /*Flawfinder: ignore*/
2958 if (b_print) 2986 if (b_print)
2959 printf("[0x%X]\tCAST ", offset); 2987 printf("[0x%X]\tCAST ", offset);
2960 offset++; 2988 offset++;
@@ -2987,7 +3015,7 @@ BOOL run_cast(U8 *buffer, S32 &offset, BOOL b_print, const LLUUID &id)
2987 case LST_STRING: 3015 case LST_STRING:
2988 { 3016 {
2989 S32 address, source = lscript_pop_int(buffer); 3017 S32 address, source = lscript_pop_int(buffer);
2990 sprintf(caststr, "%d", source); 3018 snprintf(caststr, sizeof(caststr), "%d", source); /*Flawfinder: ignore*/
2991 address = lsa_heap_add_data(buffer, new LLScriptLibData(caststr), get_max_heap_size(buffer), TRUE); 3019 address = lsa_heap_add_data(buffer, new LLScriptLibData(caststr), get_max_heap_size(buffer), TRUE);
2992 lscript_push(buffer, address); 3020 lscript_push(buffer, address);
2993 } 3021 }
@@ -3024,7 +3052,7 @@ BOOL run_cast(U8 *buffer, S32 &offset, BOOL b_print, const LLUUID &id)
3024 { 3052 {
3025 S32 address; 3053 S32 address;
3026 F32 source = lscript_pop_float(buffer); 3054 F32 source = lscript_pop_float(buffer);
3027 sprintf(caststr, "%f", source); 3055 snprintf(caststr, sizeof(caststr), "%f", source); /*Flawfinder: ignore*/
3028 address = lsa_heap_add_data(buffer, new LLScriptLibData(caststr), get_max_heap_size(buffer), TRUE); 3056 address = lsa_heap_add_data(buffer, new LLScriptLibData(caststr), get_max_heap_size(buffer), TRUE);
3029 lscript_push(buffer, address); 3057 lscript_push(buffer, address);
3030 } 3058 }
@@ -3233,7 +3261,7 @@ BOOL run_cast(U8 *buffer, S32 &offset, BOOL b_print, const LLUUID &id)
3233 S32 address; 3261 S32 address;
3234 LLVector3 source; 3262 LLVector3 source;
3235 lscript_pop_vector(buffer, source); 3263 lscript_pop_vector(buffer, source);
3236 sprintf(caststr, "<%5.5f, %5.5f, %5.5f>", source.mV[VX], source.mV[VY], source.mV[VZ]); 3264 snprintf(caststr, sizeof(caststr), "<%5.5f, %5.5f, %5.5f>", source.mV[VX], source.mV[VY], source.mV[VZ]); /*Flawfinder: ignore*/
3237 address = lsa_heap_add_data(buffer, new LLScriptLibData(caststr), get_max_heap_size(buffer), TRUE); 3265 address = lsa_heap_add_data(buffer, new LLScriptLibData(caststr), get_max_heap_size(buffer), TRUE);
3238 lscript_push(buffer, address); 3266 lscript_push(buffer, address);
3239 } 3267 }
@@ -3266,7 +3294,7 @@ BOOL run_cast(U8 *buffer, S32 &offset, BOOL b_print, const LLUUID &id)
3266 S32 address; 3294 S32 address;
3267 LLQuaternion source; 3295 LLQuaternion source;
3268 lscript_pop_quaternion(buffer, source); 3296 lscript_pop_quaternion(buffer, source);
3269 sprintf(caststr, "<%5.5f, %5.5f, %5.5f, %5.5f>", source.mQ[VX], source.mQ[VY], source.mQ[VZ], source.mQ[VS]); 3297 snprintf(caststr, sizeof(caststr), "<%5.5f, %5.5f, %5.5f, %5.5f>", source.mQ[VX], source.mQ[VY], source.mQ[VZ], source.mQ[VS]); /*Flawfinder: ignore*/
3270 address = lsa_heap_add_data(buffer, new LLScriptLibData(caststr), get_max_heap_size(buffer), TRUE); 3298 address = lsa_heap_add_data(buffer, new LLScriptLibData(caststr), get_max_heap_size(buffer), TRUE);
3271 lscript_push(buffer, address); 3299 lscript_push(buffer, address);
3272 } 3300 }
@@ -3590,22 +3618,29 @@ void lscript_run(char *filename, BOOL b_debug)
3590 char *error; 3618 char *error;
3591 BOOL b_state; 3619 BOOL b_state;
3592 LLScriptExecute *execute = NULL; 3620 LLScriptExecute *execute = NULL;
3593 FILE *file = LLFile::fopen(filename, "r"); 3621 if (filename == NULL)
3622 {
3623 llerrs << "filename is empty" << llendl;
3624 // Just reporting error is likely not enough. Need
3625 // to check how to abort or error out gracefully
3626 // from this function. XXXTBD
3627 }
3628 FILE* file = LLFile::fopen(filename, "r"); /* Flawfinder: ignore */
3594 if (file) 3629 if (file)
3595 { 3630 {
3596 execute = new LLScriptExecute(file); 3631 execute = new LLScriptExecute(file);
3597 fclose(file); 3632 fclose(file);
3598 } 3633 }
3599 file = LLFile::fopen(filename, "r"); 3634 file = LLFile::fopen(filename, "r"); /* Flawfinder: ignore */
3600 if (file) 3635 if (file)
3601 { 3636 {
3602 FILE *fp = LLFile::fopen("lscript.parse", "w"); 3637 FILE* fp = LLFile::fopen("lscript.parse", "w"); /*Flawfinder: ignore*/
3603 LLScriptLSOParse *parse = new LLScriptLSOParse(file); 3638 LLScriptLSOParse *parse = new LLScriptLSOParse(file);
3604 parse->printData(fp); 3639 parse->printData(fp);
3605 fclose(file); 3640 fclose(file);
3606 fclose(fp); 3641 fclose(fp);
3607 } 3642 }
3608 file = LLFile::fopen(filename, "r"); 3643 file = LLFile::fopen(filename, "r"); /*Flawfinder: ignore*/
3609 if (file && execute) 3644 if (file && execute)
3610 { 3645 {
3611 timer.reset(); 3646 timer.reset();
@@ -3814,7 +3849,7 @@ BOOL run_calllib(U8 *buffer, S32 &offset, BOOL b_print, const LLUUID &id)
3814 3849
3815 if (gScriptLibrary.mFunctions[arg]->mArgs) 3850 if (gScriptLibrary.mFunctions[arg]->mArgs)
3816 { 3851 {
3817 number = (S32)strlen(gScriptLibrary.mFunctions[arg]->mArgs); 3852 number = (S32)strlen(gScriptLibrary.mFunctions[arg]->mArgs); /*Flawfinder: ignore*/
3818 arguments = new LLScriptLibData[number]; 3853 arguments = new LLScriptLibData[number];
3819 } 3854 }
3820 else 3855 else
@@ -3885,7 +3920,7 @@ BOOL run_calllib_two_byte(U8 *buffer, S32 &offset, BOOL b_print, const LLUUID &i
3885 3920
3886 if (gScriptLibrary.mFunctions[arg]->mArgs) 3921 if (gScriptLibrary.mFunctions[arg]->mArgs)
3887 { 3922 {
3888 number = (S32)strlen(gScriptLibrary.mFunctions[arg]->mArgs); 3923 number = (S32)strlen(gScriptLibrary.mFunctions[arg]->mArgs); /*Flawfinder: ignore*/
3889 arguments = new LLScriptLibData[number]; 3924 arguments = new LLScriptLibData[number];
3890 } 3925 }
3891 else 3926 else
diff --git a/linden/indra/lscript/lscript_execute/lscript_execute_vc8.vcproj b/linden/indra/lscript/lscript_execute/lscript_execute_vc8.vcproj
new file mode 100644
index 0000000..0a987c8
--- /dev/null
+++ b/linden/indra/lscript/lscript_execute/lscript_execute_vc8.vcproj
@@ -0,0 +1,276 @@
1<?xml version="1.0" encoding="Windows-1252"?>
2<VisualStudioProject
3 ProjectType="Visual C++"
4 Version="8.00"
5 Name="lscript_execute"
6 ProjectGUID="{F882263E-4F2A-43D9-A45A-FA4C8EC66552}"
7 Keyword="Win32Proj"
8 >
9 <Platforms>
10 <Platform
11 Name="Win32"
12 />
13 </Platforms>
14 <ToolFiles>
15 </ToolFiles>
16 <Configurations>
17 <Configuration
18 Name="Debug|Win32"
19 OutputDirectory="../../lib_$(ConfigurationName)/i686-win32"
20 IntermediateDirectory="Debug"
21 ConfigurationType="4"
22 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
23 CharacterSet="1"
24 >
25 <Tool
26 Name="VCPreBuildEventTool"
27 />
28 <Tool
29 Name="VCCustomBuildTool"
30 />
31 <Tool
32 Name="VCXMLDataGeneratorTool"
33 />
34 <Tool
35 Name="VCWebServiceProxyGeneratorTool"
36 />
37 <Tool
38 Name="VCMIDLTool"
39 />
40 <Tool
41 Name="VCCLCompilerTool"
42 Optimization="0"
43 AdditionalIncludeDirectories="..;..\..\llcommon;..\..\llmath;&quot;..\..\..\libraries\i686-win32\include&quot;;..\..\..\libraries\include"
44 PreprocessorDefinitions="WIN32;_DEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_DEBUG"
45 MinimalRebuild="true"
46 BasicRuntimeChecks="3"
47 RuntimeLibrary="1"
48 StructMemberAlignment="4"
49 TreatWChar_tAsBuiltInType="false"
50 ForceConformanceInForLoopScope="true"
51 UsePrecompiledHeader="0"
52 WarningLevel="3"
53 WarnAsError="true"
54 Detect64BitPortabilityProblems="false"
55 DebugInformationFormat="4"
56 />
57 <Tool
58 Name="VCManagedResourceCompilerTool"
59 />
60 <Tool
61 Name="VCResourceCompilerTool"
62 />
63 <Tool
64 Name="VCPreLinkEventTool"
65 />
66 <Tool
67 Name="VCLibrarianTool"
68 OutputFile="$(OutDir)/lscript_execute.lib"
69 />
70 <Tool
71 Name="VCALinkTool"
72 />
73 <Tool
74 Name="VCXDCMakeTool"
75 />
76 <Tool
77 Name="VCBscMakeTool"
78 />
79 <Tool
80 Name="VCFxCopTool"
81 />
82 <Tool
83 Name="VCPostBuildEventTool"
84 />
85 </Configuration>
86 <Configuration
87 Name="Release|Win32"
88 OutputDirectory="../../lib_$(ConfigurationName)/i686-win32"
89 IntermediateDirectory="Release"
90 ConfigurationType="4"
91 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
92 CharacterSet="1"
93 >
94 <Tool
95 Name="VCPreBuildEventTool"
96 />
97 <Tool
98 Name="VCCustomBuildTool"
99 />
100 <Tool
101 Name="VCXMLDataGeneratorTool"
102 />
103 <Tool
104 Name="VCWebServiceProxyGeneratorTool"
105 />
106 <Tool
107 Name="VCMIDLTool"
108 />
109 <Tool
110 Name="VCCLCompilerTool"
111 AdditionalIncludeDirectories="..;..\..\llcommon;..\..\llmath;&quot;..\..\..\libraries\i686-win32\include&quot;;..\..\..\libraries\include"
112 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE"
113 RuntimeLibrary="0"
114 StructMemberAlignment="0"
115 TreatWChar_tAsBuiltInType="false"
116 ForceConformanceInForLoopScope="true"
117 UsePrecompiledHeader="0"
118 WarningLevel="3"
119 WarnAsError="true"
120 Detect64BitPortabilityProblems="false"
121 DebugInformationFormat="3"
122 />
123 <Tool
124 Name="VCManagedResourceCompilerTool"
125 />
126 <Tool
127 Name="VCResourceCompilerTool"
128 />
129 <Tool
130 Name="VCPreLinkEventTool"
131 />
132 <Tool
133 Name="VCLibrarianTool"
134 OutputFile="$(OutDir)/lscript_execute.lib"
135 />
136 <Tool
137 Name="VCALinkTool"
138 />
139 <Tool
140 Name="VCXDCMakeTool"
141 />
142 <Tool
143 Name="VCBscMakeTool"
144 />
145 <Tool
146 Name="VCFxCopTool"
147 />
148 <Tool
149 Name="VCPostBuildEventTool"
150 />
151 </Configuration>
152 <Configuration
153 Name="ReleaseNoOpt|Win32"
154 OutputDirectory="../../lib_$(ConfigurationName)/i686-win32"
155 IntermediateDirectory="$(ConfigurationName)"
156 ConfigurationType="4"
157 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
158 CharacterSet="1"
159 >
160 <Tool
161 Name="VCPreBuildEventTool"
162 />
163 <Tool
164 Name="VCCustomBuildTool"
165 />
166 <Tool
167 Name="VCXMLDataGeneratorTool"
168 />
169 <Tool
170 Name="VCWebServiceProxyGeneratorTool"
171 />
172 <Tool
173 Name="VCMIDLTool"
174 />
175 <Tool
176 Name="VCCLCompilerTool"
177 Optimization="0"
178 AdditionalIncludeDirectories="..;..\..\llcommon;..\..\llmath;&quot;..\..\..\libraries\i686-win32\include&quot;;..\..\..\libraries\include"
179 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE"
180 RuntimeLibrary="0"
181 StructMemberAlignment="0"
182 TreatWChar_tAsBuiltInType="false"
183 ForceConformanceInForLoopScope="true"
184 UsePrecompiledHeader="0"
185 WarningLevel="3"
186 WarnAsError="true"
187 Detect64BitPortabilityProblems="false"
188 DebugInformationFormat="3"
189 />
190 <Tool
191 Name="VCManagedResourceCompilerTool"
192 />
193 <Tool
194 Name="VCResourceCompilerTool"
195 />
196 <Tool
197 Name="VCPreLinkEventTool"
198 />
199 <Tool
200 Name="VCLibrarianTool"
201 OutputFile="$(OutDir)/lscript_execute.lib"
202 />
203 <Tool
204 Name="VCALinkTool"
205 />
206 <Tool
207 Name="VCXDCMakeTool"
208 />
209 <Tool
210 Name="VCBscMakeTool"
211 />
212 <Tool
213 Name="VCFxCopTool"
214 />
215 <Tool
216 Name="VCPostBuildEventTool"
217 />
218 </Configuration>
219 </Configurations>
220 <References>
221 </References>
222 <Files>
223 <Filter
224 Name="Source Files"
225 Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
226 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
227 >
228 <File
229 RelativePath=".\lscript_execute.cpp"
230 >
231 </File>
232 <File
233 RelativePath=".\lscript_heapruntime.cpp"
234 >
235 </File>
236 <File
237 RelativePath=".\lscript_readlso.cpp"
238 >
239 </File>
240 </Filter>
241 <Filter
242 Name="Header Files"
243 Filter="h;hpp;hxx;hm;inl;inc;xsd"
244 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
245 >
246 <File
247 RelativePath="..\lscript_byteconvert.h"
248 >
249 </File>
250 <File
251 RelativePath="..\lscript_byteformat.h"
252 >
253 </File>
254 <File
255 RelativePath="..\lscript_execute.h"
256 >
257 </File>
258 <File
259 RelativePath=".\lscript_heapruntime.h"
260 >
261 </File>
262 <File
263 RelativePath=".\lscript_readlso.h"
264 >
265 </File>
266 </Filter>
267 <Filter
268 Name="Resource Files"
269 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
270 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
271 >
272 </Filter>
273 </Files>
274 <Globals>
275 </Globals>
276</VisualStudioProject>
diff --git a/linden/indra/lscript/lscript_execute/lscript_readlso.cpp b/linden/indra/lscript/lscript_execute/lscript_readlso.cpp
index 6734d58..ea40892 100644
--- a/linden/indra/lscript/lscript_execute/lscript_readlso.cpp
+++ b/linden/indra/lscript/lscript_execute/lscript_readlso.cpp
@@ -122,7 +122,7 @@ void LLScriptLSOParse::printGlobals(FILE *fp)
122 F32 fpvalue; 122 F32 fpvalue;
123 LLVector3 vvalue; 123 LLVector3 vvalue;
124 LLQuaternion qvalue; 124 LLQuaternion qvalue;
125 char name[256]; 125 char name[256]; /*Flawfinder: ignore*/
126 U8 type; 126 U8 type;
127 127
128 S32 global_v_offset = get_register(mRawData, LREG_GVR); 128 S32 global_v_offset = get_register(mRawData, LREG_GVR);
@@ -190,7 +190,7 @@ void LLScriptLSOParse::printGlobalFunctions(FILE *fp)
190 S32 i, offset; 190 S32 i, offset;
191// LLVector3 vvalue; unused 191// LLVector3 vvalue; unused
192// LLQuaternion qvalue; unused 192// LLQuaternion qvalue; unused
193 char name[256]; 193 char name[256]; /*Flawfinder: ignore*/
194 U8 type; 194 U8 type;
195 195
196 offset = get_register(mRawData, LREG_GFR); 196 offset = get_register(mRawData, LREG_GFR);
@@ -280,7 +280,7 @@ void LLScriptLSOParse::printStates(FILE *fp)
280 U32 j, k; 280 U32 j, k;
281// LLVector3 vvalue; unused 281// LLVector3 vvalue; unused
282// LLQuaternion qvalue; unused 282// LLQuaternion qvalue; unused
283 char name[256]; 283 char name[256]; /*Flawfinder: ignore*/
284 284
285 S32 state_offset = get_register(mRawData, LREG_SR); 285 S32 state_offset = get_register(mRawData, LREG_SR);
286 286
@@ -1196,7 +1196,7 @@ void print_pushargf(FILE *fp, U8 *buffer, S32 &offset, S32 tabs)
1196 1196
1197void print_pushargs(FILE *fp, U8 *buffer, S32 &offset, S32 tabs) 1197void print_pushargs(FILE *fp, U8 *buffer, S32 &offset, S32 tabs)
1198{ 1198{
1199 char arg[1024]; 1199 char arg[1024]; /*Flawfinder: ignore*/
1200 lso_print_tabs(fp, tabs); 1200 lso_print_tabs(fp, tabs);
1201 fprintf(fp, "[0x%X]\tPUSHARGS ", offset++); 1201 fprintf(fp, "[0x%X]\tPUSHARGS ", offset++);
1202 bytestream2char(arg, buffer, offset); 1202 bytestream2char(arg, buffer, offset);
diff --git a/linden/indra/lscript/lscript_library.h b/linden/indra/lscript/lscript_library.h
index 300cbb6..33fc9d6 100644
--- a/linden/indra/lscript/lscript_library.h
+++ b/linden/indra/lscript/lscript_library.h
@@ -182,10 +182,10 @@ public:
182 size += 4; 182 size += 4;
183 break; 183 break;
184 case LST_KEY: 184 case LST_KEY:
185 size += (S32)strlen(mKey) + 1; 185 size += (S32)strlen(mKey) + 1; /*Flawfinder: ignore*/
186 break; 186 break;
187 case LST_STRING: 187 case LST_STRING:
188 size += (S32)strlen(mString) + 1; 188 size += (S32)strlen(mString) + 1; /*Flawfinder: ignore*/
189 break; 189 break;
190 case LST_LIST: 190 case LST_LIST:
191 break; 191 break;
@@ -241,19 +241,29 @@ public:
241 { 241 {
242 if (data.mKey) 242 if (data.mKey)
243 { 243 {
244 mKey = new char[strlen(data.mKey) + 1]; 244 mKey = new char[strlen(data.mKey) + 1]; /* Flawfinder: ignore */
245 strcpy(mKey, data.mKey); 245 if (mKey == NULL)
246 {
247 llerrs << "Memory Allocation Failed" << llendl;
248 return;
249 }
250 strcpy(mKey, data.mKey); /* Flawfinder: ignore */
246 } 251 }
247 if (data.mString) 252 if (data.mString)
248 { 253 {
249 mString = new char[strlen(data.mString) + 1]; 254 mString = new char[strlen(data.mString) + 1]; /* Flawfinder: ignore */
250 strcpy(mString, data.mString); 255 if (mString == NULL)
256 {
257 llerrs << "Memory Allocation Failed" << llendl;
258 return;
259 }
260 strcpy(mString, data.mString); /* Flawfinder: ignore */
251 } 261 }
252 } 262 }
253 263
254 LLScriptLibData(U8 *src, S32 &offset) : mListp(NULL) 264 LLScriptLibData(U8 *src, S32 &offset) : mListp(NULL)
255 { 265 {
256 static char temp[TOP_OF_MEMORY]; 266 static char temp[TOP_OF_MEMORY]; /* Flawfinder: ignore */
257 mType = (LSCRIPTType)bytestream2integer(src, offset); 267 mType = (LSCRIPTType)bytestream2integer(src, offset);
258 switch(mType) 268 switch(mType)
259 { 269 {
@@ -266,15 +276,25 @@ public:
266 case LST_KEY: 276 case LST_KEY:
267 { 277 {
268 bytestream2char(temp, src, offset); 278 bytestream2char(temp, src, offset);
269 mKey = new char[strlen(temp) + 1]; 279 mKey = new char[strlen(temp) + 1]; /* Flawfinder: ignore */
270 strcpy(mKey, temp); 280 if (mKey == NULL)
281 {
282 llerrs << "Memory Allocation Failed" << llendl;
283 return;
284 }
285 strcpy(mKey, temp); /* Flawfinder: ignore */
271 } 286 }
272 break; 287 break;
273 case LST_STRING: 288 case LST_STRING:
274 { 289 {
275 bytestream2char(temp, src, offset); 290 bytestream2char(temp, src, offset);
276 mString = new char[strlen(temp) + 1]; 291 mString = new char[strlen(temp) + 1]; /* Flawfinder: ignore */
277 strcpy(mString, temp); 292 if (mString == NULL)
293 {
294 llerrs << "Memory Allocation Failed" << llendl;
295 return;
296 }
297 strcpy(mString, temp); /* Flawfinder: ignore */
278 } 298 }
279 break; 299 break;
280 case LST_LIST: 300 case LST_LIST:
@@ -292,7 +312,7 @@ public:
292 312
293 void set(U8 *src, S32 &offset) 313 void set(U8 *src, S32 &offset)
294 { 314 {
295 static char temp[TOP_OF_MEMORY]; 315 static char temp[TOP_OF_MEMORY]; /* Flawfinder: ignore */
296 mType = (LSCRIPTType)bytestream2integer(src, offset); 316 mType = (LSCRIPTType)bytestream2integer(src, offset);
297 switch(mType) 317 switch(mType)
298 { 318 {
@@ -305,15 +325,25 @@ public:
305 case LST_KEY: 325 case LST_KEY:
306 { 326 {
307 bytestream2char(temp, src, offset); 327 bytestream2char(temp, src, offset);
308 mKey = new char[strlen(temp) + 1]; 328 mKey = new char[strlen(temp) + 1]; /* Flawfinder: ignore */
309 strcpy(mKey, temp); 329 if (mKey == NULL)
330 {
331 llerrs << "Memory Allocation Failed" << llendl;
332 return;
333 }
334 strcpy(mKey, temp); /* Flawfinder: ignore */
310 } 335 }
311 break; 336 break;
312 case LST_STRING: 337 case LST_STRING:
313 { 338 {
314 bytestream2char(temp, src, offset); 339 bytestream2char(temp, src, offset);
315 mString = new char[strlen(temp) + 1]; 340 mString = new char[strlen(temp) + 1]; /* Flawfinder: ignore */
316 strcpy(mString, temp); 341 if (mString == NULL)
342 {
343 llerrs << "Memory Allocation Failed" << llendl;
344 return;
345 }
346 strcpy(mString, temp); /* Flawfinder: ignore */
317 } 347 }
318 break; 348 break;
319 case LST_LIST: 349 case LST_LIST:
@@ -335,8 +365,13 @@ public:
335 void setFromCSV(char *src) 365 void setFromCSV(char *src)
336 { 366 {
337 mType = LST_STRING; 367 mType = LST_STRING;
338 mString = new char[strlen(src) + 1]; 368 mString = new char[strlen(src) + 1]; /* Flawfinder: ignore */
339 strcpy(mString, src); 369 if (mString == NULL)
370 {
371 llerrs << "Memory Allocation Failed" << llendl;
372 return;
373 }
374 strcpy(mString, src); /* Flawfinder: ignore */
340 } 375 }
341 376
342 LLScriptLibData(S32 integer) : mType(LST_INTEGER), mInteger(integer), mFP(0.f), mKey(NULL), mString(NULL), mVec(), mQuat(), mListp(NULL) 377 LLScriptLibData(S32 integer) : mType(LST_INTEGER), mInteger(integer), mFP(0.f), mKey(NULL), mString(NULL), mVec(), mQuat(), mListp(NULL)
@@ -362,8 +397,13 @@ public:
362 } 397 }
363 else 398 else
364 { 399 {
365 mString = new char[strlen(string) + 1]; 400 mString = new char[strlen(string) + 1]; /* Flawfinder: ignore */
366 strcpy(mString, string); 401 if (mString == NULL)
402 {
403 llerrs << "Memory Allocation Failed" << llendl;
404 return;
405 }
406 strcpy(mString, string); /* Flawfinder: ignore */
367 } 407 }
368 } 408 }
369 409
@@ -376,8 +416,13 @@ public:
376 } 416 }
377 else 417 else
378 { 418 {
379 mString = new char[strlen(string) + 1]; 419 mString = new char[strlen(string) + 1]; /* Flawfinder: ignore */
380 strcpy(mString, string); 420 if (mString == NULL)
421 {
422 llerrs << "Memory Allocation Failed" << llendl;
423 return;
424 }
425 strcpy(mString, string); /* Flawfinder: ignore */
381 } 426 }
382 } 427 }
383 428
diff --git a/linden/indra/lscript/lscript_library/lscript_alloc.cpp b/linden/indra/lscript/lscript_library/lscript_alloc.cpp
index 4636c0b..b39cd1f 100644
--- a/linden/indra/lscript/lscript_library/lscript_alloc.cpp
+++ b/linden/indra/lscript/lscript_library/lscript_alloc.cpp
@@ -127,10 +127,10 @@ S32 lsa_heap_add_data(U8 *buffer, LLScriptLibData *data, S32 heapsize, BOOL b_de
127 size = 4; 127 size = 4;
128 break; 128 break;
129 case LST_KEY: 129 case LST_KEY:
130 size = (S32)strlen(data->mKey) + 1; 130 size = (S32)strlen(data->mKey) + 1; /*Flawfinder: ignore*/
131 break; 131 break;
132 case LST_STRING: 132 case LST_STRING:
133 size = (S32)strlen(data->mString) + 1; 133 size = (S32)strlen(data->mString) + 1; /*Flawfinder: ignore*/
134 break; 134 break;
135 case LST_LIST: 135 case LST_LIST:
136 // list data 4 bytes of number of entries followed by number of pointer 136 // list data 4 bytes of number of entries followed by number of pointer
@@ -354,7 +354,7 @@ S32 lsa_create_data_block(U8 **buffer, LLScriptLibData *data, S32 base_offset)
354 { 354 {
355 if (data->mString) 355 if (data->mString)
356 { 356 {
357 size = (S32)strlen(data->mString) + 1; 357 size = (S32)strlen(data->mString) + 1; /*Flawfinder: ignore*/
358 } 358 }
359 else 359 else
360 { 360 {
@@ -365,7 +365,7 @@ S32 lsa_create_data_block(U8 **buffer, LLScriptLibData *data, S32 base_offset)
365 { 365 {
366 if (data->mKey) 366 if (data->mKey)
367 { 367 {
368 size = (S32)strlen(data->mKey) + 1; 368 size = (S32)strlen(data->mKey) + 1; /*Flawfinder: ignore*/
369 } 369 }
370 else 370 else
371 { 371 {
@@ -432,8 +432,12 @@ S32 lsa_create_data_block(U8 **buffer, LLScriptLibData *data, S32 base_offset)
432 if (listsize) 432 if (listsize)
433 { 433 {
434 U8 *tbuff = new U8[size + listsize]; 434 U8 *tbuff = new U8[size + listsize];
435 memcpy(tbuff, *buffer, size); 435 if (tbuff == NULL)
436 memcpy(tbuff + size, listbuf, listsize); 436 {
437 llerrs << "Memory Allocation Failed" << llendl;
438 }
439 memcpy(tbuff, *buffer, size); /*Flawfinder: ignore*/
440 memcpy(tbuff + size, listbuf, listsize); /*Flawfinder: ignore*/
437 size += listsize; 441 size += listsize;
438 delete [] *buffer; 442 delete [] *buffer;
439 delete [] listbuf; 443 delete [] listbuf;
@@ -516,7 +520,7 @@ void lsa_decrease_ref_count(U8 *buffer, S32 offset)
516 alloc_entry2bytestream(buffer, orig_offset, entry); 520 alloc_entry2bytestream(buffer, orig_offset, entry);
517} 521}
518 522
519char gLSAStringRead[16384]; 523char gLSAStringRead[16384]; /*Flawfinder: ignore*/
520 524
521 525
522LLScriptLibData *lsa_get_data(U8 *buffer, S32 &offset, BOOL b_dec_ref) 526LLScriptLibData *lsa_get_data(U8 *buffer, S32 &offset, BOOL b_dec_ref)
@@ -557,13 +561,13 @@ LLScriptLibData *lsa_get_data(U8 *buffer, S32 &offset, BOOL b_dec_ref)
557 break; 561 break;
558 case LST_KEY: 562 case LST_KEY:
559 bytestream2char(gLSAStringRead, buffer, offset); 563 bytestream2char(gLSAStringRead, buffer, offset);
560 retval->mKey = new char[strlen(gLSAStringRead) + 1]; 564 retval->mKey = new char[strlen(gLSAStringRead) + 1]; /*Flawfinder: ignore*/
561 strcpy(retval->mKey, gLSAStringRead); 565 strcpy(retval->mKey, gLSAStringRead); /*Flawfinder: ignore*/
562 break; 566 break;
563 case LST_STRING: 567 case LST_STRING:
564 bytestream2char(gLSAStringRead, buffer, offset); 568 bytestream2char(gLSAStringRead, buffer, offset);
565 retval->mString = new char[strlen(gLSAStringRead) + 1]; 569 retval->mString = new char[strlen(gLSAStringRead) + 1]; /*Flawfinder: ignore*/
566 strcpy(retval->mString, gLSAStringRead); 570 strcpy(retval->mString, gLSAStringRead); /*Flawfinder: ignore*/
567 break; 571 break;
568 case LST_VECTOR: 572 case LST_VECTOR:
569 bytestream2vector(retval->mVec, buffer, offset); 573 bytestream2vector(retval->mVec, buffer, offset);
@@ -703,13 +707,13 @@ S32 lsa_cat_strings(U8 *buffer, S32 offset1, S32 offset2, S32 heapsize)
703 return 0; 707 return 0;
704 } 708 }
705 709
706 S32 size = (S32)strlen(test1) + (S32)strlen(test2) + 1; 710 S32 size = (S32)strlen(test1) + (S32)strlen(test2) + 1; /*Flawfinder: ignore*/
707 711
708 LLScriptLibData *string3 = new LLScriptLibData; 712 LLScriptLibData *string3 = new LLScriptLibData;
709 string3->mType = LST_STRING; 713 string3->mType = LST_STRING;
710 string3->mString = new char[size]; 714 string3->mString = new char[size];
711 strcpy(string3->mString, test1); 715 strcpy(string3->mString, test1); /*Flawfinder: ignore*/
712 strcat(string3->mString, test2); 716 strcat(string3->mString, test2); /*Flawfinder: ignore*/
713 717
714 delete string1; 718 delete string1;
715 delete string2; 719 delete string2;
@@ -779,7 +783,7 @@ void lsa_print_heap(U8 *buffer)
779 F32 fpvalue; 783 F32 fpvalue;
780 LLVector3 vvalue; 784 LLVector3 vvalue;
781 LLQuaternion qvalue; 785 LLQuaternion qvalue;
782 char string[4096]; 786 char string[4096]; /*Flawfinder: ignore*/
783 787
784 LLScriptAllocEntry entry; 788 LLScriptAllocEntry entry;
785 789
@@ -849,7 +853,7 @@ void lsa_fprint_heap(U8 *buffer, FILE *fp)
849 F32 fpvalue; 853 F32 fpvalue;
850 LLVector3 vvalue; 854 LLVector3 vvalue;
851 LLQuaternion qvalue; 855 LLQuaternion qvalue;
852 char string[4096]; 856 char string[4096]; /*Flawfinder: ignore*/
853 857
854 LLScriptAllocEntry entry; 858 LLScriptAllocEntry entry;
855 859
@@ -997,58 +1001,9 @@ S32 lsa_cmp_lists(U8 *buffer, S32 offset1, S32 offset2)
997 1001
998 S32 length1 = list1->getListLength(); 1002 S32 length1 = list1->getListLength();
999 S32 length2 = list2->getListLength(); 1003 S32 length2 = list2->getListLength();
1000
1001 if (length1 != length2)
1002 {
1003 return length1 - length2;
1004 }
1005
1006 LLScriptLibData *runner1 = list1;
1007 LLScriptLibData *runner2 = list2;
1008
1009 S32 count = 0;
1010
1011 while (runner1)
1012 {
1013 if (runner1->mType != runner2->mType)
1014 return count;
1015
1016 switch(runner1->mType)
1017 {
1018 case LST_INTEGER:
1019 if (runner1->mInteger != runner2->mInteger)
1020 return count;
1021 break;
1022 case LST_FLOATINGPOINT:
1023 if (runner1->mFP != runner2->mFP)
1024 return count;
1025 break;
1026 case LST_KEY:
1027 if (strcmp(runner1->mKey, runner2->mKey))
1028 return count;
1029 break;
1030 case LST_STRING:
1031 if (strcmp(runner1->mString, runner2->mString))
1032 return count;
1033 break;
1034 case LST_VECTOR:
1035 if (runner1->mVec != runner2->mVec)
1036 return count;
1037 case LST_QUATERNION:
1038 if (runner1->mQuat != runner2->mQuat)
1039 return count;
1040 break;
1041 default:
1042 break;
1043 }
1044
1045 runner1 = runner1->mListp;
1046 runner2 = runner2->mListp;
1047 }
1048
1049 delete list1; 1004 delete list1;
1050 delete list2; 1005 delete list2;
1051 return 0; 1006 return length1 - length2;
1052} 1007}
1053 1008
1054 1009
diff --git a/linden/indra/lscript/lscript_library/lscript_library.cpp b/linden/indra/lscript/lscript_library/lscript_library.cpp
index 1b92608..7263ec3 100644
--- a/linden/indra/lscript/lscript_library/lscript_library.cpp
+++ b/linden/indra/lscript/lscript_library/lscript_library.cpp
@@ -119,7 +119,7 @@ void LLScriptLibrary::init()
119 addFunction(new LLScriptLibraryFunction(10.f, 0.2f, dummy_func, "llSetTexture", NULL, "si", "llSetTexture(string texture, integer face)\nsets the texture of face")); 119 addFunction(new LLScriptLibraryFunction(10.f, 0.2f, dummy_func, "llSetTexture", NULL, "si", "llSetTexture(string texture, integer face)\nsets the texture of face"));
120 addFunction(new LLScriptLibraryFunction(10.f, 0.2f, dummy_func, "llScaleTexture", NULL, "ffi", "llScaleTexture(float scales, float scalet, integer face)\nsets the texture s, t scales for the chosen face")); 120 addFunction(new LLScriptLibraryFunction(10.f, 0.2f, dummy_func, "llScaleTexture", NULL, "ffi", "llScaleTexture(float scales, float scalet, integer face)\nsets the texture s, t scales for the chosen face"));
121 addFunction(new LLScriptLibraryFunction(10.f, 0.2f, dummy_func, "llOffsetTexture", NULL, "ffi", "llOffsetTexture(float offsets, float offsett, integer face)\nsets the texture s, t offsets for the chosen face")); 121 addFunction(new LLScriptLibraryFunction(10.f, 0.2f, dummy_func, "llOffsetTexture", NULL, "ffi", "llOffsetTexture(float offsets, float offsett, integer face)\nsets the texture s, t offsets for the chosen face"));
122 addFunction(new LLScriptLibraryFunction(10.f, 0.2f, dummy_func, "llRotateTexture", NULL, "fi", "llOffsetTexture(float rotation, integer face)\nsets the texture rotation for the chosen face")); 122 addFunction(new LLScriptLibraryFunction(10.f, 0.2f, dummy_func, "llRotateTexture", NULL, "fi", "llRotateTexture(float rotation, integer face)\nsets the texture rotation for the chosen face"));
123 addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llGetTexture", "s", "i", "string llGetTexture(integer face)\ngets the texture of face (if it's a texture in the object inventory, otherwise the key in a string)")); 123 addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llGetTexture", "s", "i", "string llGetTexture(integer face)\ngets the texture of face (if it's a texture in the object inventory, otherwise the key in a string)"));
124 addFunction(new LLScriptLibraryFunction(10.f, 0.2f, dummy_func, "llSetPos", NULL, "v", "llSetPos(vector pos)\nsets the position (if the script isn't physical)")); 124 addFunction(new LLScriptLibraryFunction(10.f, 0.2f, dummy_func, "llSetPos", NULL, "v", "llSetPos(vector pos)\nsets the position (if the script isn't physical)"));
125 addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llGetPos", "v", NULL, "vector llGetPos()\ngets the position (if the script isn't physical)")); 125 addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llGetPos", "v", NULL, "vector llGetPos()\ngets the position (if the script isn't physical)"));
@@ -416,7 +416,14 @@ void LLScriptLibrary::init()
416 addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llGetParcelPrimCount", "i", "vii","integer llGetParcelPrimCount(vector pos, integer category, integer sim_wide)\nGets the number of prims on the parcel of the given category.\nCategories: PARCEL_COUNT_TOTAL, _OWNER, _GROUP, _OTHER, _SELECTED, _TEMP.")); 416 addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llGetParcelPrimCount", "i", "vii","integer llGetParcelPrimCount(vector pos, integer category, integer sim_wide)\nGets the number of prims on the parcel of the given category.\nCategories: PARCEL_COUNT_TOTAL, _OWNER, _GROUP, _OTHER, _SELECTED, _TEMP."));
417 addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llGetParcelMaxPrims", "i", "vi","integer llGetParcelMaxPrims(vector pos, integer sim_wide)\nGets the maximum number of prims allowed on the parcel at pos.")); 417 addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llGetParcelMaxPrims", "i", "vi","integer llGetParcelMaxPrims(vector pos, integer sim_wide)\nGets the maximum number of prims allowed on the parcel at pos."));
418 addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llGetParcelDetails", "l", "vl","list llGetParcelDetails(vector pos, list params)\nGets the parcel details specified in params for the parcel at pos.\nParams is one or more of: PARCEL_DETAILS_NAME, _DESC, _OWNER, _GROUP, _AREA")); 418 addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llGetParcelDetails", "l", "vl","list llGetParcelDetails(vector pos, list params)\nGets the parcel details specified in params for the parcel at pos.\nParams is one or more of: PARCEL_DETAILS_NAME, _DESC, _OWNER, _GROUP, _AREA"));
419
420
421 addFunction(new LLScriptLibraryFunction(10.f, 0.2f, dummy_func, "llSetLinkPrimitiveParams", NULL, "il", "llSetLinkPrimitiveParams(integer linknumber, list rules)\nSet primitive parameters for linknumber based on rules."));
422 addFunction(new LLScriptLibraryFunction(10.f, 0.2f, dummy_func, "llSetLinkTexture", NULL, "isi", "llSetLinkTexture(integer link_pos, string texture, integer face)\nSets the texture of face for link_pos"));
423
419 424
425 addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llStringTrim", "s", "si", "string llStringTrim(string src, integer trim_type)\nTrim leading and/or trailing spaces from a string.\nUses trim_type of STRING_TRIM, STRING_TRIM_HEAD or STRING_TRIM_TAIL."));
426
420 // energy, sleep, dummy_func, name, return type, parameters, help text, gods-only 427 // energy, sleep, dummy_func, name, return type, parameters, help text, gods-only
421 428
422 // IF YOU ADD NEW SCRIPT CALLS, YOU MUST PUT THEM AT THE END OF THIS LIST. 429 // IF YOU ADD NEW SCRIPT CALLS, YOU MUST PUT THEM AT THE END OF THIS LIST.
@@ -440,10 +447,6 @@ void LLScriptLibrary::init()
440 //addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llSetCamPositionLocked", NULL, "i", "llSetCamPositionLocked(TRUE or FALSE)\nLocks the camera position so it will not move")); 447 //addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llSetCamPositionLocked", NULL, "i", "llSetCamPositionLocked(TRUE or FALSE)\nLocks the camera position so it will not move"));
441 //addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llSetCamFocusLocked", NULL, "i", "llSetCamFocusLocked(TRUE or FALSE)\nLocks the camera focus so it will not move")); 448 //addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llSetCamFocusLocked", NULL, "i", "llSetCamFocusLocked(TRUE or FALSE)\nLocks the camera focus so it will not move"));
442 449
443// These functions are being put on hold until we think through how we want them handled (security issues). DK 02/16/05
444 //addFunction(new LLScriptLibraryFunction(10.f, 0.2f, dummy_func, "llSetLinkPrimitiveParams", NULL, "il", "llSetLinkPrimitiveParams(integer linknumber, list rules)\nSet primitive parameters for linknumber based on rules."));
445 //addFunction(new LLScriptLibraryFunction(10.f, 0.2f, dummy_func, "llSetLinkTexture", NULL, "isi", "llSetLinkTexture(integer link_pos, string texture, integer face)\nSets the texture of face for link_pos"));
446
447 //addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llSetForSale", "i", "ii", "integer llSetForSale(integer selltype, integer price)\nSets this object for sale in mode selltype for price. Returns TRUE if successfully set for sale.")); 450 //addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llSetForSale", "i", "ii", "integer llSetForSale(integer selltype, integer price)\nSets this object for sale in mode selltype for price. Returns TRUE if successfully set for sale."));
448 451
449LLScriptLibraryFunction::LLScriptLibraryFunction(F32 eu, F32 st, void (*exec_func)(LLScriptLibData *, LLScriptLibData *, const LLUUID &), char *name, char *ret_type, char *args, char *desc, BOOL god_only) 452LLScriptLibraryFunction::LLScriptLibraryFunction(F32 eu, F32 st, void (*exec_func)(LLScriptLibData *, LLScriptLibData *, const LLUUID &), char *name, char *ret_type, char *args, char *desc, BOOL god_only)
@@ -452,11 +455,17 @@ LLScriptLibraryFunction::LLScriptLibraryFunction(F32 eu, F32 st, void (*exec_fun
452 mDesc = new char[512]; 455 mDesc = new char[512];
453 if (mSleepTime) 456 if (mSleepTime)
454 { 457 {
455 sprintf(mDesc,"%s\nSleeps script for %.1f seconds.",desc,mSleepTime); 458 snprintf( /* Flawfinder: ignore */
459 mDesc,
460 512,
461 "%s\nSleeps script for %.1f seconds.",
462 desc,
463 mSleepTime);
456 } 464 }
457 else 465 else
458 { 466 {
459 strcpy(mDesc,desc); 467 strncpy(mDesc, desc, 512); /* Flawfinder: ignore */
468 mDesc[511] = '\0'; // just in case.
460 } 469 }
461} 470}
462 471
@@ -470,7 +479,10 @@ void LLScriptLibrary::addFunction(LLScriptLibraryFunction *func)
470 LLScriptLibraryFunction **temp = new LLScriptLibraryFunction*[mNextNumber + 1]; 479 LLScriptLibraryFunction **temp = new LLScriptLibraryFunction*[mNextNumber + 1];
471 if (mNextNumber) 480 if (mNextNumber)
472 { 481 {
473 memcpy(temp, mFunctions, sizeof(LLScriptLibraryFunction *)*mNextNumber); 482 memcpy( /* Flawfinder: ignore */
483 temp,
484 mFunctions,
485 sizeof(LLScriptLibraryFunction*)*mNextNumber);
474 delete [] mFunctions; 486 delete [] mFunctions;
475 } 487 }
476 mFunctions = temp; 488 mFunctions = temp;
@@ -492,7 +504,7 @@ void LLScriptLibrary::assignExec(char *name, void (*exec_func)(LLScriptLibData *
492 504
493void LLScriptLibData::print(std::ostream &s, BOOL b_prepend_comma) 505void LLScriptLibData::print(std::ostream &s, BOOL b_prepend_comma)
494{ 506{
495 char tmp[1024]; 507 char tmp[1024]; /*Flawfinder: ignore*/
496 if (b_prepend_comma) 508 if (b_prepend_comma)
497 { 509 {
498 s << ", "; 510 s << ", ";
@@ -503,7 +515,7 @@ void LLScriptLibData::print(std::ostream &s, BOOL b_prepend_comma)
503 s << mInteger; 515 s << mInteger;
504 break; 516 break;
505 case LST_FLOATINGPOINT: 517 case LST_FLOATINGPOINT:
506 snprintf(tmp, 1024, "%f", mFP); 518 snprintf(tmp, 1024, "%f", mFP); /*Flawfinder: ignore*/
507 s << tmp; 519 s << tmp;
508 break; 520 break;
509 case LST_KEY: 521 case LST_KEY:
@@ -513,12 +525,12 @@ void LLScriptLibData::print(std::ostream &s, BOOL b_prepend_comma)
513 s << mString; 525 s << mString;
514 break; 526 break;
515 case LST_VECTOR: 527 case LST_VECTOR:
516 snprintf(tmp, 1024, "<%f, %f, %f>", mVec.mV[VX], 528 snprintf(tmp, 1024, "<%f, %f, %f>", mVec.mV[VX], /* Flawfinder: ignore */
517 mVec.mV[VY], mVec.mV[VZ]); 529 mVec.mV[VY], mVec.mV[VZ]);
518 s << tmp; 530 s << tmp;
519 break; 531 break;
520 case LST_QUATERNION: 532 case LST_QUATERNION:
521 snprintf(tmp, 1024, "<%f, %f, %f, %f>", mQuat.mQ[VX], mQuat.mQ[VY], 533 snprintf(tmp, 1024, "<%f, %f, %f, %f>", mQuat.mQ[VX], mQuat.mQ[VY], /* Flawfinder: ignore */
522 mQuat.mQ[VZ], mQuat.mQ[VS]); 534 mQuat.mQ[VZ], mQuat.mQ[VS]);
523 s << tmp; 535 s << tmp;
524 break; 536 break;
@@ -536,7 +548,7 @@ void LLScriptLibData::print_separator(std::ostream& ostr, BOOL b_prepend_sep, ch
536 //print(ostr, FALSE); 548 //print(ostr, FALSE);
537 { 549 {
538 BOOL b_prepend_comma = FALSE; 550 BOOL b_prepend_comma = FALSE;
539 char tmp[1024]; 551 char tmp[1024]; /* Flawfinder: ignore */
540 if (b_prepend_comma) 552 if (b_prepend_comma)
541 { 553 {
542 ostr << ", "; 554 ostr << ", ";
@@ -547,7 +559,7 @@ void LLScriptLibData::print_separator(std::ostream& ostr, BOOL b_prepend_sep, ch
547 ostr << mInteger; 559 ostr << mInteger;
548 break; 560 break;
549 case LST_FLOATINGPOINT: 561 case LST_FLOATINGPOINT:
550 snprintf(tmp, 1024, "%f", mFP); 562 snprintf(tmp, 1024, "%f", mFP); /* Flawfinder: ignore */
551 ostr << tmp; 563 ostr << tmp;
552 break; 564 break;
553 case LST_KEY: 565 case LST_KEY:
@@ -557,12 +569,12 @@ void LLScriptLibData::print_separator(std::ostream& ostr, BOOL b_prepend_sep, ch
557 ostr << mString; 569 ostr << mString;
558 break; 570 break;
559 case LST_VECTOR: 571 case LST_VECTOR:
560 snprintf(tmp, 1024, "<%f, %f, %f>", mVec.mV[VX], 572 snprintf(tmp, 1024, "<%f, %f, %f>", mVec.mV[VX], /* Flawfinder: ignore */
561 mVec.mV[VY], mVec.mV[VZ]); 573 mVec.mV[VY], mVec.mV[VZ]);
562 ostr << tmp; 574 ostr << tmp;
563 break; 575 break;
564 case LST_QUATERNION: 576 case LST_QUATERNION:
565 snprintf(tmp, 1024, "<%f, %f, %f, %f>", mQuat.mQ[VX], mQuat.mQ[VY], 577 snprintf(tmp, 1024, "<%f, %f, %f, %f>", mQuat.mQ[VX], mQuat.mQ[VY], /* Flawfinder: ignore */
566 mQuat.mQ[VZ], mQuat.mQ[VS]); 578 mQuat.mQ[VZ], mQuat.mQ[VS]);
567 ostr << tmp; 579 ostr << tmp;
568 break; 580 break;
diff --git a/linden/indra/lscript/lscript_library/lscript_library_vc8.vcproj b/linden/indra/lscript/lscript_library/lscript_library_vc8.vcproj
new file mode 100644
index 0000000..ee92752
--- /dev/null
+++ b/linden/indra/lscript/lscript_library/lscript_library_vc8.vcproj
@@ -0,0 +1,268 @@
1<?xml version="1.0" encoding="Windows-1252"?>
2<VisualStudioProject
3 ProjectType="Visual C++"
4 Version="8.00"
5 Name="lscript_library"
6 ProjectGUID="{BFA102B0-C891-4E13-B1CF-C2F28073DA8E}"
7 Keyword="Win32Proj"
8 >
9 <Platforms>
10 <Platform
11 Name="Win32"
12 />
13 </Platforms>
14 <ToolFiles>
15 </ToolFiles>
16 <Configurations>
17 <Configuration
18 Name="Debug|Win32"
19 OutputDirectory="../../lib_$(ConfigurationName)/i686-win32"
20 IntermediateDirectory="Debug"
21 ConfigurationType="4"
22 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
23 CharacterSet="1"
24 >
25 <Tool
26 Name="VCPreBuildEventTool"
27 />
28 <Tool
29 Name="VCCustomBuildTool"
30 />
31 <Tool
32 Name="VCXMLDataGeneratorTool"
33 />
34 <Tool
35 Name="VCWebServiceProxyGeneratorTool"
36 />
37 <Tool
38 Name="VCMIDLTool"
39 />
40 <Tool
41 Name="VCCLCompilerTool"
42 Optimization="0"
43 AdditionalIncludeDirectories="..\;..\..\llmath;..\..\llcommon;&quot;..\..\..\libraries\i686-win32&quot;;..\..\..\libraries\include"
44 PreprocessorDefinitions="WIN32;_DEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_DEBUG"
45 MinimalRebuild="true"
46 BasicRuntimeChecks="3"
47 RuntimeLibrary="1"
48 StructMemberAlignment="4"
49 TreatWChar_tAsBuiltInType="false"
50 ForceConformanceInForLoopScope="true"
51 UsePrecompiledHeader="0"
52 WarningLevel="3"
53 WarnAsError="true"
54 Detect64BitPortabilityProblems="false"
55 DebugInformationFormat="4"
56 />
57 <Tool
58 Name="VCManagedResourceCompilerTool"
59 />
60 <Tool
61 Name="VCResourceCompilerTool"
62 />
63 <Tool
64 Name="VCPreLinkEventTool"
65 />
66 <Tool
67 Name="VCLibrarianTool"
68 OutputFile="$(OutDir)/lscript_library.lib"
69 />
70 <Tool
71 Name="VCALinkTool"
72 />
73 <Tool
74 Name="VCXDCMakeTool"
75 />
76 <Tool
77 Name="VCBscMakeTool"
78 />
79 <Tool
80 Name="VCFxCopTool"
81 />
82 <Tool
83 Name="VCPostBuildEventTool"
84 />
85 </Configuration>
86 <Configuration
87 Name="Release|Win32"
88 OutputDirectory="../../lib_$(ConfigurationName)/i686-win32"
89 IntermediateDirectory="Release"
90 ConfigurationType="4"
91 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
92 CharacterSet="1"
93 >
94 <Tool
95 Name="VCPreBuildEventTool"
96 />
97 <Tool
98 Name="VCCustomBuildTool"
99 />
100 <Tool
101 Name="VCXMLDataGeneratorTool"
102 />
103 <Tool
104 Name="VCWebServiceProxyGeneratorTool"
105 />
106 <Tool
107 Name="VCMIDLTool"
108 />
109 <Tool
110 Name="VCCLCompilerTool"
111 AdditionalIncludeDirectories="..\;..\..\llmath;..\..\llcommon;&quot;..\..\..\libraries\i686-win32&quot;;..\..\..\libraries\include"
112 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE"
113 RuntimeLibrary="0"
114 StructMemberAlignment="0"
115 TreatWChar_tAsBuiltInType="false"
116 ForceConformanceInForLoopScope="true"
117 UsePrecompiledHeader="0"
118 WarningLevel="3"
119 WarnAsError="true"
120 Detect64BitPortabilityProblems="false"
121 DebugInformationFormat="3"
122 />
123 <Tool
124 Name="VCManagedResourceCompilerTool"
125 />
126 <Tool
127 Name="VCResourceCompilerTool"
128 />
129 <Tool
130 Name="VCPreLinkEventTool"
131 />
132 <Tool
133 Name="VCLibrarianTool"
134 OutputFile="$(OutDir)/lscript_library.lib"
135 />
136 <Tool
137 Name="VCALinkTool"
138 />
139 <Tool
140 Name="VCXDCMakeTool"
141 />
142 <Tool
143 Name="VCBscMakeTool"
144 />
145 <Tool
146 Name="VCFxCopTool"
147 />
148 <Tool
149 Name="VCPostBuildEventTool"
150 />
151 </Configuration>
152 <Configuration
153 Name="ReleaseNoOpt|Win32"
154 OutputDirectory="../../lib_$(ConfigurationName)/i686-win32"
155 IntermediateDirectory="$(ConfigurationName)"
156 ConfigurationType="4"
157 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
158 CharacterSet="1"
159 >
160 <Tool
161 Name="VCPreBuildEventTool"
162 />
163 <Tool
164 Name="VCCustomBuildTool"
165 />
166 <Tool
167 Name="VCXMLDataGeneratorTool"
168 />
169 <Tool
170 Name="VCWebServiceProxyGeneratorTool"
171 />
172 <Tool
173 Name="VCMIDLTool"
174 />
175 <Tool
176 Name="VCCLCompilerTool"
177 Optimization="0"
178 AdditionalIncludeDirectories="..\;..\..\llmath;..\..\llcommon;&quot;..\..\..\libraries\i686-win32&quot;;..\..\..\libraries\include"
179 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE"
180 RuntimeLibrary="0"
181 StructMemberAlignment="0"
182 TreatWChar_tAsBuiltInType="false"
183 ForceConformanceInForLoopScope="true"
184 UsePrecompiledHeader="0"
185 WarningLevel="3"
186 WarnAsError="true"
187 Detect64BitPortabilityProblems="false"
188 DebugInformationFormat="3"
189 />
190 <Tool
191 Name="VCManagedResourceCompilerTool"
192 />
193 <Tool
194 Name="VCResourceCompilerTool"
195 />
196 <Tool
197 Name="VCPreLinkEventTool"
198 />
199 <Tool
200 Name="VCLibrarianTool"
201 OutputFile="$(OutDir)/lscript_library.lib"
202 />
203 <Tool
204 Name="VCALinkTool"
205 />
206 <Tool
207 Name="VCXDCMakeTool"
208 />
209 <Tool
210 Name="VCBscMakeTool"
211 />
212 <Tool
213 Name="VCFxCopTool"
214 />
215 <Tool
216 Name="VCPostBuildEventTool"
217 />
218 </Configuration>
219 </Configurations>
220 <References>
221 </References>
222 <Files>
223 <Filter
224 Name="Source Files"
225 Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
226 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
227 >
228 <File
229 RelativePath=".\lscript_alloc.cpp"
230 >
231 </File>
232 <File
233 RelativePath=".\lscript_export.cpp"
234 >
235 </File>
236 <File
237 RelativePath=".\lscript_library.cpp"
238 >
239 </File>
240 </Filter>
241 <Filter
242 Name="Header Files"
243 Filter="h;hpp;hxx;hm;inl;inc;xsd"
244 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
245 >
246 <File
247 RelativePath="..\lscript_alloc.h"
248 >
249 </File>
250 <File
251 RelativePath="..\lscript_export.h"
252 >
253 </File>
254 <File
255 RelativePath="..\lscript_library.h"
256 >
257 </File>
258 </Filter>
259 <Filter
260 Name="Resource Files"
261 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
262 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
263 >
264 </Filter>
265 </Files>
266 <Globals>
267 </Globals>
268</VisualStudioProject>