From db0f5847ea8b96b3c1ac08e7aeb43d83daacb8e4 Mon Sep 17 00:00:00 2001 From: Josh Bell Date: Sat, 16 Feb 2008 00:57:46 +0000 Subject: svn merge -r 80024:80160 svn+ssh://svn.lindenlab.com/svn/linden/branches/Branch_1-19-1-Server Port fixes for: * DEV-10609 Checkboxes in About Land untick when selected * Extend the sim node regex to support sim1-telstra.durga.lindenlab.com for colo testing. * Provide "version_valid" for each version when querying a channel * Update to latest eventlet r87, to handle multi-character terminators split across read buffers * DEV-10487 Log viewer stats sim and php fix * QAR-288: Pull in crash fixes from LSL bytecode parsing --- indra/lscript/lscript_library/lscript_alloc.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra/lscript/lscript_library') diff --git a/indra/lscript/lscript_library/lscript_alloc.cpp b/indra/lscript/lscript_library/lscript_alloc.cpp index dac83eb3a8..519ef9fb8c 100644 --- a/indra/lscript/lscript_library/lscript_alloc.cpp +++ b/indra/lscript/lscript_library/lscript_alloc.cpp @@ -526,7 +526,7 @@ void lsa_decrease_ref_count(U8 *buffer, S32 offset) alloc_entry2bytestream(buffer, orig_offset, entry); } -char gLSAStringRead[16384]; /*Flawfinder: ignore*/ +char gLSAStringRead[TOP_OF_MEMORY]; /*Flawfinder: ignore*/ LLScriptLibData *lsa_get_data(U8 *buffer, S32 &offset, BOOL b_dec_ref) @@ -566,12 +566,12 @@ LLScriptLibData *lsa_get_data(U8 *buffer, S32 &offset, BOOL b_dec_ref) retval->mFP = bytestream2float(buffer, offset); break; case LST_KEY: - bytestream2char(gLSAStringRead, buffer, offset); + bytestream2char(gLSAStringRead, buffer, offset, sizeof(gLSAStringRead)); // global sring buffer? for real? :( retval->mKey = new char[strlen(gLSAStringRead) + 1]; /*Flawfinder: ignore*/ strcpy(retval->mKey, gLSAStringRead); /*Flawfinder: ignore*/ break; case LST_STRING: - bytestream2char(gLSAStringRead, buffer, offset); + bytestream2char(gLSAStringRead, buffer, offset, sizeof(gLSAStringRead)); retval->mString = new char[strlen(gLSAStringRead) + 1]; /*Flawfinder: ignore*/ strcpy(retval->mString, gLSAStringRead); /*Flawfinder: ignore*/ break; @@ -818,11 +818,11 @@ void lsa_print_heap(U8 *buffer) printf("%f\n", fpvalue); break; case LST_STRING: - bytestream2char(string, buffer, readoffset); + bytestream2char(string, buffer, readoffset, sizeof(string)); printf("%s\n", string); break; case LST_KEY: - bytestream2char(string, buffer, readoffset); + bytestream2char(string, buffer, readoffset, sizeof(string)); printf("%s\n", string); break; case LST_VECTOR: @@ -885,11 +885,11 @@ void lsa_fprint_heap(U8 *buffer, FILE *fp) fprintf(fp, "%f\n", fpvalue); break; case LST_STRING: - bytestream2char(string, buffer, readoffset); + bytestream2char(string, buffer, readoffset, sizeof(string)); fprintf(fp, "%s\n", string); break; case LST_KEY: - bytestream2char(string, buffer, readoffset); + bytestream2char(string, buffer, readoffset, sizeof(string)); fprintf(fp, "%s\n", string); break; case LST_VECTOR: -- cgit v1.2.3