summaryrefslogtreecommitdiff
path: root/indra/llmath/llvolume.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llmath/llvolume.cpp')
-rw-r--r--indra/llmath/llvolume.cpp24
1 files changed, 18 insertions, 6 deletions
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index da2dbf23c3..0f8adb2f5c 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -706,6 +706,8 @@ BOOL LLProfileParams::importFile(FILE *fp)
{
const S32 BUFSIZE = 16384;
char buffer[BUFSIZE];
+ // *NOTE: changing the size or type of these buffers will require
+ // changing the sscanf below.
char keyword[256];
char valuestr[256];
keyword[0] = 0;
@@ -716,7 +718,7 @@ BOOL LLProfileParams::importFile(FILE *fp)
while (!feof(fp))
{
fgets(buffer, BUFSIZE, fp);
- sscanf(buffer, " %s %s", keyword, valuestr);
+ sscanf(buffer, " %255s %255s", keyword, valuestr);
if (!keyword)
{
continue;
@@ -776,6 +778,8 @@ BOOL LLProfileParams::importLegacyStream(std::istream& input_stream)
{
const S32 BUFSIZE = 16384;
char buffer[BUFSIZE];
+ // *NOTE: changing the size or type of these buffers will require
+ // changing the sscanf below.
char keyword[256];
char valuestr[256];
keyword[0] = 0;
@@ -786,7 +790,7 @@ BOOL LLProfileParams::importLegacyStream(std::istream& input_stream)
while (input_stream.good())
{
input_stream.getline(buffer, BUFSIZE);
- sscanf(buffer, " %s %s", keyword, valuestr);
+ sscanf(buffer, " %255s %255s", keyword, valuestr);
if (!keyword)
{
continue;
@@ -1196,6 +1200,8 @@ BOOL LLPathParams::importFile(FILE *fp)
{
const S32 BUFSIZE = 16384;
char buffer[BUFSIZE];
+ // *NOTE: changing the size or type of these buffers will require
+ // changing the sscanf below.
char keyword[256];
char valuestr[256];
keyword[0] = 0;
@@ -1208,7 +1214,7 @@ BOOL LLPathParams::importFile(FILE *fp)
while (!feof(fp))
{
fgets(buffer, BUFSIZE, fp);
- sscanf(buffer, " %s %s", keyword, valuestr);
+ sscanf(buffer, " %255s %255s", keyword, valuestr);
if (!keyword)
{
continue;
@@ -1335,6 +1341,8 @@ BOOL LLPathParams::importLegacyStream(std::istream& input_stream)
{
const S32 BUFSIZE = 16384;
char buffer[BUFSIZE];
+ // *NOTE: changing the size or type of these buffers will require
+ // changing the sscanf below.
char keyword[256];
char valuestr[256];
keyword[0] = 0;
@@ -1347,7 +1355,7 @@ BOOL LLPathParams::importLegacyStream(std::istream& input_stream)
while (input_stream.good())
{
input_stream.getline(buffer, BUFSIZE);
- sscanf(buffer, " %s %s", keyword, valuestr);
+ sscanf(buffer, " %255s %255s", keyword, valuestr);
if (!keyword)
{
continue;
@@ -3321,13 +3329,15 @@ BOOL LLVolumeParams::importFile(FILE *fp)
//llinfos << "importing volume" << llendl;
const S32 BUFSIZE = 16384;
char buffer[BUFSIZE];
+ // *NOTE: changing the size or type of this buffer will require
+ // changing the sscanf below.
char keyword[256];
keyword[0] = 0;
while (!feof(fp))
{
fgets(buffer, BUFSIZE, fp);
- sscanf(buffer, " %s", keyword);
+ sscanf(buffer, " %255s", keyword);
if (!keyword)
{
continue;
@@ -3372,6 +3382,8 @@ BOOL LLVolumeParams::importLegacyStream(std::istream& input_stream)
{
//llinfos << "importing volume" << llendl;
const S32 BUFSIZE = 16384;
+ // *NOTE: changing the size or type of this buffer will require
+ // changing the sscanf below.
char buffer[BUFSIZE];
char keyword[256];
keyword[0] = 0;
@@ -3379,7 +3391,7 @@ BOOL LLVolumeParams::importLegacyStream(std::istream& input_stream)
while (input_stream.good())
{
input_stream.getline(buffer, BUFSIZE);
- sscanf(buffer, " %s", keyword);
+ sscanf(buffer, " %255s", keyword);
if (!keyword)
{
continue;