diff options
author | Jacek Antonelli | 2008-08-15 23:44:48 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:48 -0500 |
commit | 9b4f54c826ffa4f94efa866068c9d6ecdfb4b424 (patch) | |
tree | 2f8ae193ab487088962e628f1ee9dee2f5901f01 /linden/indra/llinventory/llsaleinfo.cpp | |
parent | Second Life viewer sources 1.13.2.12 (diff) | |
download | meta-impy-9b4f54c826ffa4f94efa866068c9d6ecdfb4b424.zip meta-impy-9b4f54c826ffa4f94efa866068c9d6ecdfb4b424.tar.gz meta-impy-9b4f54c826ffa4f94efa866068c9d6ecdfb4b424.tar.bz2 meta-impy-9b4f54c826ffa4f94efa866068c9d6ecdfb4b424.tar.xz |
Second Life viewer sources 1.13.2.15
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llinventory/llsaleinfo.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/linden/indra/llinventory/llsaleinfo.cpp b/linden/indra/llinventory/llsaleinfo.cpp index b82bd18..98043d1 100644 --- a/linden/indra/llinventory/llsaleinfo.cpp +++ b/linden/indra/llinventory/llsaleinfo.cpp | |||
@@ -158,6 +158,8 @@ BOOL LLSaleInfo::importFile(FILE* fp, BOOL& has_perm_mask, U32& perm_mask) | |||
158 | { | 158 | { |
159 | has_perm_mask = FALSE; | 159 | has_perm_mask = FALSE; |
160 | 160 | ||
161 | // *NOTE: Changing the buffer size will require changing the scanf | ||
162 | // calls below. | ||
161 | char buffer[MAX_STRING]; | 163 | char buffer[MAX_STRING]; |
162 | char keyword[MAX_STRING]; | 164 | char keyword[MAX_STRING]; |
163 | char valuestr[MAX_STRING]; | 165 | char valuestr[MAX_STRING]; |
@@ -168,7 +170,7 @@ BOOL LLSaleInfo::importFile(FILE* fp, BOOL& has_perm_mask, U32& perm_mask) | |||
168 | while(success && (!feof(fp))) | 170 | while(success && (!feof(fp))) |
169 | { | 171 | { |
170 | fgets(buffer, MAX_STRING, fp); | 172 | fgets(buffer, MAX_STRING, fp); |
171 | sscanf(buffer, " %s %s", keyword, valuestr); | 173 | sscanf(buffer, " %254s %254s", keyword, valuestr); |
172 | if(!keyword) | 174 | if(!keyword) |
173 | { | 175 | { |
174 | continue; | 176 | continue; |
@@ -209,6 +211,8 @@ BOOL LLSaleInfo::importLegacyStream(std::istream& input_stream, BOOL& has_perm_m | |||
209 | { | 211 | { |
210 | has_perm_mask = FALSE; | 212 | has_perm_mask = FALSE; |
211 | 213 | ||
214 | // *NOTE: Changing the buffer size will require changing the scanf | ||
215 | // calls below. | ||
212 | char buffer[MAX_STRING]; | 216 | char buffer[MAX_STRING]; |
213 | char keyword[MAX_STRING]; | 217 | char keyword[MAX_STRING]; |
214 | char valuestr[MAX_STRING]; | 218 | char valuestr[MAX_STRING]; |
@@ -219,7 +223,7 @@ BOOL LLSaleInfo::importLegacyStream(std::istream& input_stream, BOOL& has_perm_m | |||
219 | while(success && input_stream.good()) | 223 | while(success && input_stream.good()) |
220 | { | 224 | { |
221 | input_stream.getline(buffer, MAX_STRING); | 225 | input_stream.getline(buffer, MAX_STRING); |
222 | sscanf(buffer, " %s %s", keyword, valuestr); | 226 | sscanf(buffer, " %254s %254s", keyword, valuestr); |
223 | if(!keyword) | 227 | if(!keyword) |
224 | { | 228 | { |
225 | continue; | 229 | continue; |