aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llmessage
diff options
context:
space:
mode:
authorDavid Seikel2011-05-12 20:36:22 +1000
committerDavid Seikel2011-05-12 20:36:22 +1000
commit0311187f308bf24077f0c28243d16c9da8dcf879 (patch)
tree55dab1e4b58f114955ffb16ede8d43e73099b1e9 /linden/indra/llmessage
parentTemporary workaround for the "TP over 4096 sims" bug. (diff)
parentMissed checkin (diff)
downloadmeta-impy-0311187f308bf24077f0c28243d16c9da8dcf879.zip
meta-impy-0311187f308bf24077f0c28243d16c9da8dcf879.tar.gz
meta-impy-0311187f308bf24077f0c28243d16c9da8dcf879.tar.bz2
meta-impy-0311187f308bf24077f0c28243d16c9da8dcf879.tar.xz
Merge branch 'libotr' into exp
Conflicts: linden/indra/llmessage/message.cpp linden/indra/newview/llprefsadvanced.cpp
Diffstat (limited to 'linden/indra/llmessage')
-rw-r--r--linden/indra/llmessage/lldatapacker.cpp94
-rw-r--r--linden/indra/llmessage/llinstantmessage.cpp4
-rw-r--r--linden/indra/llmessage/message.cpp4
3 files changed, 51 insertions, 51 deletions
diff --git a/linden/indra/llmessage/lldatapacker.cpp b/linden/indra/llmessage/lldatapacker.cpp
index b746b5a..8270ddf 100644
--- a/linden/indra/llmessage/lldatapacker.cpp
+++ b/linden/indra/llmessage/lldatapacker.cpp
@@ -671,7 +671,7 @@ void LLDataPackerBinaryBuffer::dumpBufferToLog()
671 S32 cur_line = 0; 671 S32 cur_line = 0;
672 for (i = 0; i < mBufferSize; i++) 672 for (i = 0; i < mBufferSize; i++)
673 { 673 {
674 snprintf(line_buffer + cur_line_pos*3, sizeof(line_buffer) - cur_line_pos*3, "%02x ", mBufferp[i]); /* Flawfinder: ignore */ 674 ll_snprintf(line_buffer + cur_line_pos*3, sizeof(line_buffer) - cur_line_pos*3, "%02x ", mBufferp[i]); /* Flawfinder: ignore */
675 cur_line_pos++; 675 cur_line_pos++;
676 if (cur_line_pos >= 16) 676 if (cur_line_pos >= 16)
677 { 677 {
@@ -696,14 +696,14 @@ BOOL LLDataPackerAsciiBuffer::packString(const std::string& value, const char *n
696 int numCopied = 0; 696 int numCopied = 0;
697 if (mWriteEnabled) 697 if (mWriteEnabled)
698 { 698 {
699 numCopied = snprintf(mCurBufferp,getBufferSize()-getCurrentSize(),"%s\n", value.c_str()); /* Flawfinder: ignore */ 699 numCopied = ll_snprintf(mCurBufferp,getBufferSize()-getCurrentSize(),"%s\n", value.c_str()); /* Flawfinder: ignore */
700 } 700 }
701 else 701 else
702 { 702 {
703 numCopied = value.length() + 1; /*Flawfinder: ignore*/ 703 numCopied = value.length() + 1; /*Flawfinder: ignore*/
704 } 704 }
705 705
706 // snprintf returns number of bytes that would have been written 706 // ll_snprintf returns number of bytes that would have been written
707 // had the output not being truncated. In that case, it will 707 // had the output not being truncated. In that case, it will
708 // return either -1 or value >= passed in size value . So a check needs to be added 708 // return either -1 or value >= passed in size value . So a check needs to be added
709 // to detect truncation, and if there is any, only account for the 709 // to detect truncation, and if there is any, only account for the
@@ -741,9 +741,9 @@ BOOL LLDataPackerAsciiBuffer::packBinaryData(const U8 *value, S32 size, const ch
741 int numCopied = 0; 741 int numCopied = 0;
742 if (mWriteEnabled) 742 if (mWriteEnabled)
743 { 743 {
744 numCopied = snprintf(mCurBufferp,getBufferSize()-getCurrentSize(),"%010d ", size); /* Flawfinder: ignore */ 744 numCopied = ll_snprintf(mCurBufferp,getBufferSize()-getCurrentSize(),"%010d ", size); /* Flawfinder: ignore */
745 745
746 // snprintf returns number of bytes that would have been 746 // ll_snprintf returns number of bytes that would have been
747 // written had the output not being truncated. In that case, 747 // written had the output not being truncated. In that case,
748 // it will retuen >= passed in size value. so a check needs 748 // it will retuen >= passed in size value. so a check needs
749 // to be added to detect truncation, and if there is any, only 749 // to be added to detect truncation, and if there is any, only
@@ -761,7 +761,7 @@ BOOL LLDataPackerAsciiBuffer::packBinaryData(const U8 *value, S32 size, const ch
761 BOOL bBufferFull = FALSE; 761 BOOL bBufferFull = FALSE;
762 for (i = 0; i < size && !bBufferFull; i++) 762 for (i = 0; i < size && !bBufferFull; i++)
763 { 763 {
764 numCopied = snprintf(mCurBufferp, getBufferSize()-getCurrentSize(), "%02x ", value[i]); /* Flawfinder: ignore */ 764 numCopied = ll_snprintf(mCurBufferp, getBufferSize()-getCurrentSize(), "%02x ", value[i]); /* Flawfinder: ignore */
765 if (numCopied < 0 || numCopied > getBufferSize()-getCurrentSize()) 765 if (numCopied < 0 || numCopied > getBufferSize()-getCurrentSize())
766 { 766 {
767 numCopied = getBufferSize()-getCurrentSize(); 767 numCopied = getBufferSize()-getCurrentSize();
@@ -773,7 +773,7 @@ BOOL LLDataPackerAsciiBuffer::packBinaryData(const U8 *value, S32 size, const ch
773 773
774 if (!bBufferFull) 774 if (!bBufferFull)
775 { 775 {
776 numCopied = snprintf(mCurBufferp,getBufferSize()-getCurrentSize(), "\n"); /* Flawfinder: ignore */ 776 numCopied = ll_snprintf(mCurBufferp,getBufferSize()-getCurrentSize(), "\n"); /* Flawfinder: ignore */
777 if (numCopied < 0 || numCopied > getBufferSize()-getCurrentSize()) 777 if (numCopied < 0 || numCopied > getBufferSize()-getCurrentSize())
778 { 778 {
779 numCopied = getBufferSize()-getCurrentSize(); 779 numCopied = getBufferSize()-getCurrentSize();
@@ -835,7 +835,7 @@ BOOL LLDataPackerAsciiBuffer::packBinaryDataFixed(const U8 *value, S32 size, con
835 BOOL bBufferFull = FALSE; 835 BOOL bBufferFull = FALSE;
836 for (i = 0; i < size && !bBufferFull; i++) 836 for (i = 0; i < size && !bBufferFull; i++)
837 { 837 {
838 numCopied = snprintf(mCurBufferp, getBufferSize()-getCurrentSize(), "%02x ", value[i]); /* Flawfinder: ignore */ 838 numCopied = ll_snprintf(mCurBufferp, getBufferSize()-getCurrentSize(), "%02x ", value[i]); /* Flawfinder: ignore */
839 if (numCopied < 0 || numCopied > getBufferSize()-getCurrentSize()) 839 if (numCopied < 0 || numCopied > getBufferSize()-getCurrentSize())
840 { 840 {
841 numCopied = getBufferSize()-getCurrentSize(); 841 numCopied = getBufferSize()-getCurrentSize();
@@ -847,7 +847,7 @@ BOOL LLDataPackerAsciiBuffer::packBinaryDataFixed(const U8 *value, S32 size, con
847 } 847 }
848 if (!bBufferFull) 848 if (!bBufferFull)
849 { 849 {
850 numCopied = snprintf(mCurBufferp,getBufferSize()-getCurrentSize(), "\n"); /* Flawfinder: ignore */ 850 numCopied = ll_snprintf(mCurBufferp,getBufferSize()-getCurrentSize(), "\n"); /* Flawfinder: ignore */
851 if (numCopied < 0 || numCopied > getBufferSize()-getCurrentSize()) 851 if (numCopied < 0 || numCopied > getBufferSize()-getCurrentSize())
852 { 852 {
853 numCopied = getBufferSize()-getCurrentSize(); 853 numCopied = getBufferSize()-getCurrentSize();
@@ -901,15 +901,15 @@ BOOL LLDataPackerAsciiBuffer::packU8(const U8 value, const char *name)
901 int numCopied = 0; 901 int numCopied = 0;
902 if (mWriteEnabled) 902 if (mWriteEnabled)
903 { 903 {
904 numCopied = snprintf(mCurBufferp,getBufferSize()-getCurrentSize(),"%d\n", value); /* Flawfinder: ignore */ 904 numCopied = ll_snprintf(mCurBufferp,getBufferSize()-getCurrentSize(),"%d\n", value); /* Flawfinder: ignore */
905 } 905 }
906 else 906 else
907 { 907 {
908 // just do the write to a temp buffer to get the length 908 // just do the write to a temp buffer to get the length
909 numCopied = snprintf(DUMMY_BUFFER, sizeof(DUMMY_BUFFER), "%d\n", value); /* Flawfinder: ignore */ 909 numCopied = ll_snprintf(DUMMY_BUFFER, sizeof(DUMMY_BUFFER), "%d\n", value); /* Flawfinder: ignore */
910 } 910 }
911 911
912 // snprintf returns number of bytes that would have been written 912 // ll_snprintf returns number of bytes that would have been written
913 // had the output not being truncated. In that case, it will 913 // had the output not being truncated. In that case, it will
914 // return either -1 or value >= passed in size value . So a check needs to be added 914 // return either -1 or value >= passed in size value . So a check needs to be added
915 // to detect truncation, and if there is any, only account for the 915 // to detect truncation, and if there is any, only account for the
@@ -949,14 +949,14 @@ BOOL LLDataPackerAsciiBuffer::packU16(const U16 value, const char *name)
949 int numCopied = 0; 949 int numCopied = 0;
950 if (mWriteEnabled) 950 if (mWriteEnabled)
951 { 951 {
952 numCopied = snprintf(mCurBufferp,getBufferSize()-getCurrentSize(),"%d\n", value); /* Flawfinder: ignore */ 952 numCopied = ll_snprintf(mCurBufferp,getBufferSize()-getCurrentSize(),"%d\n", value); /* Flawfinder: ignore */
953 } 953 }
954 else 954 else
955 { 955 {
956 numCopied = snprintf(DUMMY_BUFFER, sizeof(DUMMY_BUFFER), "%d\n", value); /* Flawfinder: ignore */ 956 numCopied = ll_snprintf(DUMMY_BUFFER, sizeof(DUMMY_BUFFER), "%d\n", value); /* Flawfinder: ignore */
957 } 957 }
958 958
959 // snprintf returns number of bytes that would have been written 959 // ll_snprintf returns number of bytes that would have been written
960 // had the output not being truncated. In that case, it will 960 // had the output not being truncated. In that case, it will
961 // return either -1 or value >= passed in size value . So a check needs to be added 961 // return either -1 or value >= passed in size value . So a check needs to be added
962 // to detect truncation, and if there is any, only account for the 962 // to detect truncation, and if there is any, only account for the
@@ -997,13 +997,13 @@ BOOL LLDataPackerAsciiBuffer::packU32(const U32 value, const char *name)
997 int numCopied = 0; 997 int numCopied = 0;
998 if (mWriteEnabled) 998 if (mWriteEnabled)
999 { 999 {
1000 numCopied = snprintf(mCurBufferp,getBufferSize()-getCurrentSize(),"%u\n", value); /* Flawfinder: ignore */ 1000 numCopied = ll_snprintf(mCurBufferp,getBufferSize()-getCurrentSize(),"%u\n", value); /* Flawfinder: ignore */
1001 } 1001 }
1002 else 1002 else
1003 { 1003 {
1004 numCopied = snprintf(DUMMY_BUFFER, sizeof(DUMMY_BUFFER), "%u\n", value); /* Flawfinder: ignore */ 1004 numCopied = ll_snprintf(DUMMY_BUFFER, sizeof(DUMMY_BUFFER), "%u\n", value); /* Flawfinder: ignore */
1005 } 1005 }
1006 // snprintf returns number of bytes that would have been written 1006 // ll_snprintf returns number of bytes that would have been written
1007 // had the output not being truncated. In that case, it will 1007 // had the output not being truncated. In that case, it will
1008 // return either -1 or value >= passed in size value . So a check needs to be added 1008 // return either -1 or value >= passed in size value . So a check needs to be added
1009 // to detect truncation, and if there is any, only account for the 1009 // to detect truncation, and if there is any, only account for the
@@ -1041,13 +1041,13 @@ BOOL LLDataPackerAsciiBuffer::packS32(const S32 value, const char *name)
1041 int numCopied = 0; 1041 int numCopied = 0;
1042 if (mWriteEnabled) 1042 if (mWriteEnabled)
1043 { 1043 {
1044 numCopied = snprintf(mCurBufferp,getBufferSize()-getCurrentSize(),"%d\n", value); /* Flawfinder: ignore */ 1044 numCopied = ll_snprintf(mCurBufferp,getBufferSize()-getCurrentSize(),"%d\n", value); /* Flawfinder: ignore */
1045 } 1045 }
1046 else 1046 else
1047 { 1047 {
1048 numCopied = snprintf(DUMMY_BUFFER, sizeof(DUMMY_BUFFER), "%d\n", value); /* Flawfinder: ignore */ 1048 numCopied = ll_snprintf(DUMMY_BUFFER, sizeof(DUMMY_BUFFER), "%d\n", value); /* Flawfinder: ignore */
1049 } 1049 }
1050 // snprintf returns number of bytes that would have been written 1050 // ll_snprintf returns number of bytes that would have been written
1051 // had the output not being truncated. In that case, it will 1051 // had the output not being truncated. In that case, it will
1052 // return either -1 or value >= passed in size value . So a check needs to be added 1052 // return either -1 or value >= passed in size value . So a check needs to be added
1053 // to detect truncation, and if there is any, only account for the 1053 // to detect truncation, and if there is any, only account for the
@@ -1085,13 +1085,13 @@ BOOL LLDataPackerAsciiBuffer::packF32(const F32 value, const char *name)
1085 int numCopied = 0; 1085 int numCopied = 0;
1086 if (mWriteEnabled) 1086 if (mWriteEnabled)
1087 { 1087 {
1088 numCopied = snprintf(mCurBufferp,getBufferSize()-getCurrentSize(),"%f\n", value); /* Flawfinder: ignore */ 1088 numCopied = ll_snprintf(mCurBufferp,getBufferSize()-getCurrentSize(),"%f\n", value); /* Flawfinder: ignore */
1089 } 1089 }
1090 else 1090 else
1091 { 1091 {
1092 numCopied = snprintf(DUMMY_BUFFER, sizeof(DUMMY_BUFFER), "%f\n", value); /* Flawfinder: ignore */ 1092 numCopied = ll_snprintf(DUMMY_BUFFER, sizeof(DUMMY_BUFFER), "%f\n", value); /* Flawfinder: ignore */
1093 } 1093 }
1094 // snprintf returns number of bytes that would have been written 1094 // ll_snprintf returns number of bytes that would have been written
1095 // had the output not being truncated. In that case, it will 1095 // had the output not being truncated. In that case, it will
1096 // return either -1 or value >= passed in size value . So a check needs to be added 1096 // return either -1 or value >= passed in size value . So a check needs to be added
1097 // to detect truncation, and if there is any, only account for the 1097 // to detect truncation, and if there is any, only account for the
@@ -1129,13 +1129,13 @@ BOOL LLDataPackerAsciiBuffer::packColor4(const LLColor4 &value, const char *name
1129 int numCopied = 0; 1129 int numCopied = 0;
1130 if (mWriteEnabled) 1130 if (mWriteEnabled)
1131 { 1131 {
1132 numCopied = snprintf(mCurBufferp,getBufferSize()-getCurrentSize(),"%f %f %f %f\n", value.mV[0], value.mV[1], value.mV[2], value.mV[3]); /* Flawfinder: ignore */ 1132 numCopied = ll_snprintf(mCurBufferp,getBufferSize()-getCurrentSize(),"%f %f %f %f\n", value.mV[0], value.mV[1], value.mV[2], value.mV[3]); /* Flawfinder: ignore */
1133 } 1133 }
1134 else 1134 else
1135 { 1135 {
1136 numCopied = snprintf(DUMMY_BUFFER,sizeof(DUMMY_BUFFER),"%f %f %f %f\n", value.mV[0], value.mV[1], value.mV[2], value.mV[3]); /* Flawfinder: ignore */ 1136 numCopied = ll_snprintf(DUMMY_BUFFER,sizeof(DUMMY_BUFFER),"%f %f %f %f\n", value.mV[0], value.mV[1], value.mV[2], value.mV[3]); /* Flawfinder: ignore */
1137 } 1137 }
1138 // snprintf returns number of bytes that would have been written 1138 // ll_snprintf returns number of bytes that would have been written
1139 // had the output not being truncated. In that case, it will 1139 // had the output not being truncated. In that case, it will
1140 // return either -1 or value >= passed in size value . So a check needs to be added 1140 // return either -1 or value >= passed in size value . So a check needs to be added
1141 // to detect truncation, and if there is any, only account for the 1141 // to detect truncation, and if there is any, only account for the
@@ -1172,13 +1172,13 @@ BOOL LLDataPackerAsciiBuffer::packColor4U(const LLColor4U &value, const char *na
1172 int numCopied = 0; 1172 int numCopied = 0;
1173 if (mWriteEnabled) 1173 if (mWriteEnabled)
1174 { 1174 {
1175 numCopied = snprintf(mCurBufferp,getBufferSize()-getCurrentSize(),"%d %d %d %d\n", value.mV[0], value.mV[1], value.mV[2], value.mV[3]); /* Flawfinder: ignore */ 1175 numCopied = ll_snprintf(mCurBufferp,getBufferSize()-getCurrentSize(),"%d %d %d %d\n", value.mV[0], value.mV[1], value.mV[2], value.mV[3]); /* Flawfinder: ignore */
1176 } 1176 }
1177 else 1177 else
1178 { 1178 {
1179 numCopied = snprintf(DUMMY_BUFFER,sizeof(DUMMY_BUFFER),"%d %d %d %d\n", value.mV[0], value.mV[1], value.mV[2], value.mV[3]); /* Flawfinder: ignore */ 1179 numCopied = ll_snprintf(DUMMY_BUFFER,sizeof(DUMMY_BUFFER),"%d %d %d %d\n", value.mV[0], value.mV[1], value.mV[2], value.mV[3]); /* Flawfinder: ignore */
1180 } 1180 }
1181 // snprintf returns number of bytes that would have been written 1181 // ll_snprintf returns number of bytes that would have been written
1182 // had the output not being truncated. In that case, it will 1182 // had the output not being truncated. In that case, it will
1183 // return either -1 or value >= passed in size value . So a check needs to be added 1183 // return either -1 or value >= passed in size value . So a check needs to be added
1184 // to detect truncation, and if there is any, only account for the 1184 // to detect truncation, and if there is any, only account for the
@@ -1222,13 +1222,13 @@ BOOL LLDataPackerAsciiBuffer::packVector2(const LLVector2 &value, const char *na
1222 int numCopied = 0; 1222 int numCopied = 0;
1223 if (mWriteEnabled) 1223 if (mWriteEnabled)
1224 { 1224 {
1225 numCopied = snprintf(mCurBufferp,getBufferSize()-getCurrentSize(),"%f %f\n", value.mV[0], value.mV[1]); /* Flawfinder: ignore */ 1225 numCopied = ll_snprintf(mCurBufferp,getBufferSize()-getCurrentSize(),"%f %f\n", value.mV[0], value.mV[1]); /* Flawfinder: ignore */
1226 } 1226 }
1227 else 1227 else
1228 { 1228 {
1229 numCopied = snprintf(DUMMY_BUFFER,sizeof(DUMMY_BUFFER),"%f %f\n", value.mV[0], value.mV[1]); /* Flawfinder: ignore */ 1229 numCopied = ll_snprintf(DUMMY_BUFFER,sizeof(DUMMY_BUFFER),"%f %f\n", value.mV[0], value.mV[1]); /* Flawfinder: ignore */
1230 } 1230 }
1231 // snprintf returns number of bytes that would have been written 1231 // ll_snprintf returns number of bytes that would have been written
1232 // had the output not being truncated. In that case, it will 1232 // had the output not being truncated. In that case, it will
1233 // return either -1 or value >= passed in size value . So a check needs to be added 1233 // return either -1 or value >= passed in size value . So a check needs to be added
1234 // to detect truncation, and if there is any, only account for the 1234 // to detect truncation, and if there is any, only account for the
@@ -1266,13 +1266,13 @@ BOOL LLDataPackerAsciiBuffer::packVector3(const LLVector3 &value, const char *na
1266 int numCopied = 0; 1266 int numCopied = 0;
1267 if (mWriteEnabled) 1267 if (mWriteEnabled)
1268 { 1268 {
1269 numCopied = snprintf(mCurBufferp,getBufferSize()-getCurrentSize(),"%f %f %f\n", value.mV[0], value.mV[1], value.mV[2]); /* Flawfinder: ignore */ 1269 numCopied = ll_snprintf(mCurBufferp,getBufferSize()-getCurrentSize(),"%f %f %f\n", value.mV[0], value.mV[1], value.mV[2]); /* Flawfinder: ignore */
1270 } 1270 }
1271 else 1271 else
1272 { 1272 {
1273 numCopied = snprintf(DUMMY_BUFFER,sizeof(DUMMY_BUFFER),"%f %f %f\n", value.mV[0], value.mV[1], value.mV[2]); /* Flawfinder: ignore */ 1273 numCopied = ll_snprintf(DUMMY_BUFFER,sizeof(DUMMY_BUFFER),"%f %f %f\n", value.mV[0], value.mV[1], value.mV[2]); /* Flawfinder: ignore */
1274 } 1274 }
1275 // snprintf returns number of bytes that would have been written 1275 // ll_snprintf returns number of bytes that would have been written
1276 // had the output not being truncated. In that case, it will 1276 // had the output not being truncated. In that case, it will
1277 // return either -1 or value >= passed in size value . So a check needs to be added 1277 // return either -1 or value >= passed in size value . So a check needs to be added
1278 // to detect truncation, and if there is any, only account for the 1278 // to detect truncation, and if there is any, only account for the
@@ -1309,13 +1309,13 @@ BOOL LLDataPackerAsciiBuffer::packVector4(const LLVector4 &value, const char *na
1309 int numCopied = 0; 1309 int numCopied = 0;
1310 if (mWriteEnabled) 1310 if (mWriteEnabled)
1311 { 1311 {
1312 numCopied = snprintf(mCurBufferp,getBufferSize()-getCurrentSize(),"%f %f %f %f\n", value.mV[0], value.mV[1], value.mV[2], value.mV[3]); /* Flawfinder: ignore */ 1312 numCopied = ll_snprintf(mCurBufferp,getBufferSize()-getCurrentSize(),"%f %f %f %f\n", value.mV[0], value.mV[1], value.mV[2], value.mV[3]); /* Flawfinder: ignore */
1313 } 1313 }
1314 else 1314 else
1315 { 1315 {
1316 numCopied = snprintf(DUMMY_BUFFER,sizeof(DUMMY_BUFFER),"%f %f %f %f\n", value.mV[0], value.mV[1], value.mV[2], value.mV[3]); /* Flawfinder: ignore */ 1316 numCopied = ll_snprintf(DUMMY_BUFFER,sizeof(DUMMY_BUFFER),"%f %f %f %f\n", value.mV[0], value.mV[1], value.mV[2], value.mV[3]); /* Flawfinder: ignore */
1317 } 1317 }
1318 // snprintf returns number of bytes that would have been written 1318 // ll_snprintf returns number of bytes that would have been written
1319 // had the output not being truncated. In that case, it will 1319 // had the output not being truncated. In that case, it will
1320 // return either -1 or value >= passed in size value . So a check needs to be added 1320 // return either -1 or value >= passed in size value . So a check needs to be added
1321 // to detect truncation, and if there is any, only account for the 1321 // to detect truncation, and if there is any, only account for the
@@ -1356,13 +1356,13 @@ BOOL LLDataPackerAsciiBuffer::packUUID(const LLUUID &value, const char *name)
1356 { 1356 {
1357 std::string tmp_str; 1357 std::string tmp_str;
1358 value.toString(tmp_str); 1358 value.toString(tmp_str);
1359 numCopied = snprintf(mCurBufferp,getBufferSize()-getCurrentSize(),"%s\n", tmp_str.c_str()); /* Flawfinder: ignore */ 1359 numCopied = ll_snprintf(mCurBufferp,getBufferSize()-getCurrentSize(),"%s\n", tmp_str.c_str()); /* Flawfinder: ignore */
1360 } 1360 }
1361 else 1361 else
1362 { 1362 {
1363 numCopied = 64 + 1; // UUID + newline 1363 numCopied = 64 + 1; // UUID + newline
1364 } 1364 }
1365 // snprintf returns number of bytes that would have been written 1365 // ll_snprintf returns number of bytes that would have been written
1366 // had the output not being truncated. In that case, it will 1366 // had the output not being truncated. In that case, it will
1367 // return either -1 or value >= passed in size value . So a check needs to be added 1367 // return either -1 or value >= passed in size value . So a check needs to be added
1368 // to detect truncation, and if there is any, only account for the 1368 // to detect truncation, and if there is any, only account for the
@@ -1407,14 +1407,14 @@ void LLDataPackerAsciiBuffer::writeIndentedName(const char *name)
1407 int numCopied = 0; 1407 int numCopied = 0;
1408 if (mWriteEnabled) 1408 if (mWriteEnabled)
1409 { 1409 {
1410 numCopied = snprintf(mCurBufferp,getBufferSize()-getCurrentSize(),"%s\t", name); /* Flawfinder: ignore */ 1410 numCopied = ll_snprintf(mCurBufferp,getBufferSize()-getCurrentSize(),"%s\t", name); /* Flawfinder: ignore */
1411 } 1411 }
1412 else 1412 else
1413 { 1413 {
1414 numCopied = (S32)strlen(name) + 1; /* Flawfinder: ignore */ //name + tab 1414 numCopied = (S32)strlen(name) + 1; /* Flawfinder: ignore */ //name + tab
1415 } 1415 }
1416 1416
1417 // snprintf returns number of bytes that would have been written 1417 // ll_snprintf returns number of bytes that would have been written
1418 // had the output not being truncated. In that case, it will 1418 // had the output not being truncated. In that case, it will
1419 // return either -1 or value >= passed in size value . So a check needs to be added 1419 // return either -1 or value >= passed in size value . So a check needs to be added
1420 // to detect truncation, and if there is any, only account for the 1420 // to detect truncation, and if there is any, only account for the
@@ -1480,7 +1480,7 @@ std::string convertF32ToString(F32 val)
1480{ 1480{
1481 std::string str; 1481 std::string str;
1482 char buf[20]; 1482 char buf[20];
1483 snprintf(buf, 20, "%f", val); 1483 ll_snprintf(buf, 20, "%f", val);
1484 str = buf; 1484 str = buf;
1485 return str; 1485 return str;
1486} 1486}
@@ -1535,13 +1535,13 @@ BOOL LLDataPackerAsciiFile::packBinaryData(const U8 *value, S32 size, const char
1535 else if (mOutputStream) 1535 else if (mOutputStream)
1536 { 1536 {
1537 char buffer[32]; /* Flawfinder: ignore */ 1537 char buffer[32]; /* Flawfinder: ignore */
1538 snprintf(buffer,sizeof(buffer), "%010d ", size); /* Flawfinder: ignore */ 1538 ll_snprintf(buffer,sizeof(buffer), "%010d ", size); /* Flawfinder: ignore */
1539 *mOutputStream << buffer; 1539 *mOutputStream << buffer;
1540 1540
1541 S32 i; 1541 S32 i;
1542 for (i = 0; i < size; i++) 1542 for (i = 0; i < size; i++)
1543 { 1543 {
1544 snprintf(buffer, sizeof(buffer), "%02x ", value[i]); /* Flawfinder: ignore */ 1544 ll_snprintf(buffer, sizeof(buffer), "%02x ", value[i]); /* Flawfinder: ignore */
1545 *mOutputStream << buffer; 1545 *mOutputStream << buffer;
1546 } 1546 }
1547 *mOutputStream << "\n"; 1547 *mOutputStream << "\n";
@@ -1595,7 +1595,7 @@ BOOL LLDataPackerAsciiFile::packBinaryDataFixed(const U8 *value, S32 size, const
1595 S32 i; 1595 S32 i;
1596 for (i = 0; i < size; i++) 1596 for (i = 0; i < size; i++)
1597 { 1597 {
1598 snprintf(buffer, sizeof(buffer), "%02x ", value[i]); /* Flawfinder: ignore */ 1598 ll_snprintf(buffer, sizeof(buffer), "%02x ", value[i]); /* Flawfinder: ignore */
1599 *mOutputStream << buffer; 1599 *mOutputStream << buffer;
1600 } 1600 }
1601 *mOutputStream << "\n"; 1601 *mOutputStream << "\n";
diff --git a/linden/indra/llmessage/llinstantmessage.cpp b/linden/indra/llmessage/llinstantmessage.cpp
index 30205d8..63586a5 100644
--- a/linden/indra/llmessage/llinstantmessage.cpp
+++ b/linden/indra/llmessage/llinstantmessage.cpp
@@ -234,8 +234,8 @@ void pack_instant_message_block(
234 if(!message.empty()) 234 if(!message.empty())
235 { 235 {
236 char buffer[MTUBYTES]; 236 char buffer[MTUBYTES];
237 int num_written = snprintf(buffer, MTUBYTES, "%s", message.c_str()); /* Flawfinder: ignore */ 237 int num_written = ll_snprintf(buffer, MTUBYTES, "%s", message.c_str()); /* Flawfinder: ignore */
238 // snprintf returns number of bytes that would have been written 238 // ll_snprintf returns number of bytes that would have been written
239 // had the output not being truncated. In that case, it will 239 // had the output not being truncated. In that case, it will
240 // return either -1 or value >= passed in size value . So a check needs to be added 240 // return either -1 or value >= passed in size value . So a check needs to be added
241 // to detect truncation, and if there is any, only account for the 241 // to detect truncation, and if there is any, only account for the
diff --git a/linden/indra/llmessage/message.cpp b/linden/indra/llmessage/message.cpp
index 3eda579..9aaa034 100644
--- a/linden/indra/llmessage/message.cpp
+++ b/linden/indra/llmessage/message.cpp
@@ -3125,7 +3125,7 @@ bool LLMessageSystem::generateDigestForNumberAndUUIDs(
3125 3125
3126 d.update((const unsigned char *) colon, (U32)strlen(colon)); /* Flawfinder: ignore */ 3126 d.update((const unsigned char *) colon, (U32)strlen(colon)); /* Flawfinder: ignore */
3127 3127
3128 snprintf(tbuf, sizeof(tbuf),"%i", number); /* Flawfinder: ignore */ 3128 ll_snprintf(tbuf, sizeof(tbuf),"%i", number); /* Flawfinder: ignore */
3129 d.update((unsigned char *) tbuf, (U32)strlen(tbuf)); /* Flawfinder: ignore */ 3129 d.update((unsigned char *) tbuf, (U32)strlen(tbuf)); /* Flawfinder: ignore */
3130 3130
3131 d.update((const unsigned char *) colon, (U32)strlen(colon)); /* Flawfinder: ignore */ 3131 d.update((const unsigned char *) colon, (U32)strlen(colon)); /* Flawfinder: ignore */
@@ -3385,7 +3385,7 @@ void LLMessageSystem::dumpPacketToLog()
3385 for (i = 0; i < mTrueReceiveSize; i++) 3385 for (i = 0; i < mTrueReceiveSize; i++)
3386 { 3386 {
3387 S32 offset = cur_line_pos * 3; 3387 S32 offset = cur_line_pos * 3;
3388 snprintf(line_buffer + offset, sizeof(line_buffer) - offset, 3388 ll_snprintf(line_buffer + offset, sizeof(line_buffer) - offset,
3389 "%02x ", mTrueReceiveBuffer.buffer[i]); /* Flawfinder: ignore */ 3389 "%02x ", mTrueReceiveBuffer.buffer[i]); /* Flawfinder: ignore */
3390 cur_line_pos++; 3390 cur_line_pos++;
3391 if (cur_line_pos >= 16) 3391 if (cur_line_pos >= 16)