diff options
Diffstat (limited to 'linden/indra/llmessage')
-rw-r--r-- | linden/indra/llmessage/llassetstorage.cpp | 2 | ||||
-rw-r--r-- | linden/indra/llmessage/llcachename.cpp | 2 | ||||
-rw-r--r-- | linden/indra/llmessage/lldatapacker.cpp | 94 | ||||
-rw-r--r-- | linden/indra/llmessage/llinstantmessage.cpp | 5 | ||||
-rw-r--r-- | linden/indra/llmessage/lliosocket.cpp | 2 | ||||
-rw-r--r-- | linden/indra/llmessage/llloginflags.h | 2 | ||||
-rw-r--r-- | linden/indra/llmessage/llpacketring.cpp | 2 | ||||
-rw-r--r-- | linden/indra/llmessage/llregionflags.h | 9 | ||||
-rw-r--r-- | linden/indra/llmessage/lltaskname.h | 2 | ||||
-rw-r--r-- | linden/indra/llmessage/message.cpp | 6 | ||||
-rw-r--r-- | linden/indra/llmessage/message.h | 3 | ||||
-rw-r--r-- | linden/indra/llmessage/net.cpp | 2 |
12 files changed, 61 insertions, 70 deletions
diff --git a/linden/indra/llmessage/llassetstorage.cpp b/linden/indra/llmessage/llassetstorage.cpp index 0ab1081..fd1dd95 100644 --- a/linden/indra/llmessage/llassetstorage.cpp +++ b/linden/indra/llmessage/llassetstorage.cpp | |||
@@ -38,7 +38,7 @@ | |||
38 | 38 | ||
39 | #include "llassetstorage.h" | 39 | #include "llassetstorage.h" |
40 | 40 | ||
41 | // linden library includes | 41 | // viewer library includes |
42 | #include "llmath.h" | 42 | #include "llmath.h" |
43 | #include "llstring.h" | 43 | #include "llstring.h" |
44 | #include "lldir.h" | 44 | #include "lldir.h" |
diff --git a/linden/indra/llmessage/llcachename.cpp b/linden/indra/llmessage/llcachename.cpp index 88a0cfe..db81e8c 100644 --- a/linden/indra/llmessage/llcachename.cpp +++ b/linden/indra/llmessage/llcachename.cpp | |||
@@ -34,7 +34,7 @@ | |||
34 | 34 | ||
35 | #include "llcachename.h" | 35 | #include "llcachename.h" |
36 | 36 | ||
37 | // linden library includes | 37 | // viewer library includes |
38 | #include "lldbstrings.h" | 38 | #include "lldbstrings.h" |
39 | #include "llframetimer.h" | 39 | #include "llframetimer.h" |
40 | #include "llhost.h" | 40 | #include "llhost.h" |
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 44be3ae..63586a5 100644 --- a/linden/indra/llmessage/llinstantmessage.cpp +++ b/linden/indra/llmessage/llinstantmessage.cpp | |||
@@ -60,6 +60,7 @@ const S32 VOTE_UNANIMOUS = 2; | |||
60 | const char EMPTY_BINARY_BUCKET[] = ""; | 60 | const char EMPTY_BINARY_BUCKET[] = ""; |
61 | const S32 EMPTY_BINARY_BUCKET_SIZE = 1; | 61 | const S32 EMPTY_BINARY_BUCKET_SIZE = 1; |
62 | const U32 NO_TIMESTAMP = 0; | 62 | const U32 NO_TIMESTAMP = 0; |
63 | // Damn, this seems to be hard coded into the protocol. | ||
63 | const std::string SYSTEM_FROM("Second Life"); | 64 | const std::string SYSTEM_FROM("Second Life"); |
64 | const S32 IM_TTL = 1; | 65 | const S32 IM_TTL = 1; |
65 | 66 | ||
@@ -233,8 +234,8 @@ void pack_instant_message_block( | |||
233 | if(!message.empty()) | 234 | if(!message.empty()) |
234 | { | 235 | { |
235 | char buffer[MTUBYTES]; | 236 | char buffer[MTUBYTES]; |
236 | 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 */ |
237 | // snprintf returns number of bytes that would have been written | 238 | // ll_snprintf returns number of bytes that would have been written |
238 | // had the output not being truncated. In that case, it will | 239 | // had the output not being truncated. In that case, it will |
239 | // 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 |
240 | // 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/lliosocket.cpp b/linden/indra/llmessage/lliosocket.cpp index 686c037..150b771 100644 --- a/linden/indra/llmessage/lliosocket.cpp +++ b/linden/indra/llmessage/lliosocket.cpp | |||
@@ -597,7 +597,7 @@ LLIOPipe::EStatus LLIOServerSocket::process_impl( | |||
597 | else | 597 | else |
598 | { | 598 | { |
599 | char buf[256]; | 599 | char buf[256]; |
600 | llwarns << "Unable to accept linden socket: " << apr_strerror(status, buf, sizeof(buf)) << llendl; | 600 | llwarns << "Unable to accept server socket: " << apr_strerror(status, buf, sizeof(buf)) << llendl; |
601 | } | 601 | } |
602 | 602 | ||
603 | PUMP_DEBUG; | 603 | PUMP_DEBUG; |
diff --git a/linden/indra/llmessage/llloginflags.h b/linden/indra/llmessage/llloginflags.h index 6f119e7..ceade87 100644 --- a/linden/indra/llmessage/llloginflags.h +++ b/linden/indra/llmessage/llloginflags.h | |||
@@ -33,7 +33,7 @@ | |||
33 | #ifndef LL_LLLOGINFLAGS_H | 33 | #ifndef LL_LLLOGINFLAGS_H |
34 | #define LL_LLLOGINFLAGS_H | 34 | #define LL_LLLOGINFLAGS_H |
35 | 35 | ||
36 | // Is this your first login to Second Life? | 36 | // Is this your first login to the grid? |
37 | const U32 LOGIN_FLAG_FIRST_LOGIN = (1 << 0); | 37 | const U32 LOGIN_FLAG_FIRST_LOGIN = (1 << 0); |
38 | 38 | ||
39 | // Is this a trial account? | 39 | // Is this a trial account? |
diff --git a/linden/indra/llmessage/llpacketring.cpp b/linden/indra/llmessage/llpacketring.cpp index a39b435..e7dad79 100644 --- a/linden/indra/llmessage/llpacketring.cpp +++ b/linden/indra/llmessage/llpacketring.cpp | |||
@@ -34,7 +34,7 @@ | |||
34 | 34 | ||
35 | #include "llpacketring.h" | 35 | #include "llpacketring.h" |
36 | 36 | ||
37 | // linden library includes | 37 | // viewer library includes |
38 | #include "llerror.h" | 38 | #include "llerror.h" |
39 | #include "lltimer.h" | 39 | #include "lltimer.h" |
40 | #include "timing.h" | 40 | #include "timing.h" |
diff --git a/linden/indra/llmessage/llregionflags.h b/linden/indra/llmessage/llregionflags.h index 2324785..70c3499 100644 --- a/linden/indra/llmessage/llregionflags.h +++ b/linden/indra/llmessage/llregionflags.h | |||
@@ -137,15 +137,6 @@ inline U32 unset_prelude_flags(U32 flags) | |||
137 | & ~(REGION_FLAGS_PRELUDE_SET | REGION_FLAGS_SUN_FIXED)); | 137 | & ~(REGION_FLAGS_PRELUDE_SET | REGION_FLAGS_SUN_FIXED)); |
138 | } | 138 | } |
139 | 139 | ||
140 | // estate constants. Need to match first few etries in indra.estate table. | ||
141 | const U32 ESTATE_ALL = 0; // will not match in db, reserved key for logic | ||
142 | const U32 ESTATE_MAINLAND = 1; | ||
143 | const U32 ESTATE_ORIENTATION = 2; | ||
144 | const U32 ESTATE_INTERNAL = 3; | ||
145 | const U32 ESTATE_SHOWCASE = 4; | ||
146 | const U32 ESTATE_TEEN = 5; | ||
147 | const U32 ESTATE_LAST_LINDEN = 5; // last linden owned/managed estate | ||
148 | |||
149 | // for EstateOwnerRequest, setaccess message | 140 | // for EstateOwnerRequest, setaccess message |
150 | const U32 ESTATE_ACCESS_ALLOWED_AGENTS = 1 << 0; | 141 | const U32 ESTATE_ACCESS_ALLOWED_AGENTS = 1 << 0; |
151 | const U32 ESTATE_ACCESS_ALLOWED_GROUPS = 1 << 1; | 142 | const U32 ESTATE_ACCESS_ALLOWED_GROUPS = 1 << 1; |
diff --git a/linden/indra/llmessage/lltaskname.h b/linden/indra/llmessage/lltaskname.h index 401d355..305b31a 100644 --- a/linden/indra/llmessage/lltaskname.h +++ b/linden/indra/llmessage/lltaskname.h | |||
@@ -44,7 +44,7 @@ | |||
44 | typedef enum e_lltask_name | 44 | typedef enum e_lltask_name |
45 | { | 45 | { |
46 | LLTASK_NULL = 0, // Not a valid task | 46 | LLTASK_NULL = 0, // Not a valid task |
47 | LLTASK_AGENT = 1, // The player's agent in Linden World | 47 | LLTASK_AGENT = 1, // The player's agent in world |
48 | LLTASK_CHILD_AGENT = 2, // Child agents sent to adjacent regions | 48 | LLTASK_CHILD_AGENT = 2, // Child agents sent to adjacent regions |
49 | // LLTASK_BASIC_SHOT, // Simple shot that moves in a straight line | 49 | // LLTASK_BASIC_SHOT, // Simple shot that moves in a straight line |
50 | // LLTASK_BIG_SHOT, // Big shot that uses gravity | 50 | // LLTASK_BIG_SHOT, // Big shot that uses gravity |
diff --git a/linden/indra/llmessage/message.cpp b/linden/indra/llmessage/message.cpp index 81f7c2a..9aaa034 100644 --- a/linden/indra/llmessage/message.cpp +++ b/linden/indra/llmessage/message.cpp | |||
@@ -51,7 +51,7 @@ | |||
51 | #include "apr_network_io.h" | 51 | #include "apr_network_io.h" |
52 | #include "apr_poll.h" | 52 | #include "apr_poll.h" |
53 | 53 | ||
54 | // linden library headers | 54 | // viewer library headers |
55 | #include "indra_constants.h" | 55 | #include "indra_constants.h" |
56 | #include "lldarray.h" | 56 | #include "lldarray.h" |
57 | #include "lldir.h" | 57 | #include "lldir.h" |
@@ -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) |
diff --git a/linden/indra/llmessage/message.h b/linden/indra/llmessage/message.h index 43c3b0a..1ef15d2 100644 --- a/linden/indra/llmessage/message.h +++ b/linden/indra/llmessage/message.h | |||
@@ -305,8 +305,7 @@ public: | |||
305 | S32 getErrorCode() const { return mErrorCode; } | 305 | S32 getErrorCode() const { return mErrorCode; } |
306 | 306 | ||
307 | // Read file and build message templates filename must point to a | 307 | // Read file and build message templates filename must point to a |
308 | // valid string which specifies the path of a valid linden | 308 | // valid string which specifies the path of a valid template. |
309 | // template. | ||
310 | void loadTemplateFile(const std::string& filename, bool failure_is_fatal); | 309 | void loadTemplateFile(const std::string& filename, bool failure_is_fatal); |
311 | 310 | ||
312 | 311 | ||
diff --git a/linden/indra/llmessage/net.cpp b/linden/indra/llmessage/net.cpp index 6db7214..fa51645 100644 --- a/linden/indra/llmessage/net.cpp +++ b/linden/indra/llmessage/net.cpp | |||
@@ -50,7 +50,7 @@ | |||
50 | #include <errno.h> | 50 | #include <errno.h> |
51 | #endif | 51 | #endif |
52 | 52 | ||
53 | // linden library includes | 53 | // viewer library includes |
54 | #include "llerror.h" | 54 | #include "llerror.h" |
55 | #include "llhost.h" | 55 | #include "llhost.h" |
56 | #include "lltimer.h" | 56 | #include "lltimer.h" |