summaryrefslogtreecommitdiff
path: root/indra/llcorehttp/_httpoprequest.cpp
diff options
context:
space:
mode:
authorMonty Brandenberg <monty@lindenlab.com>2013-07-08 20:31:09 +0000
committerMonty Brandenberg <monty@lindenlab.com>2013-07-08 20:31:09 +0000
commitfb734d621e6fa2004d191849783e81da75992d06 (patch)
tree3e94ea39ccd541c2c01adbb989b22d674566acee /indra/llcorehttp/_httpoprequest.cpp
parent10f9264f7b25dcd8591c965e8af83e0d9c260636 (diff)
Found the memory corruptor. String trimmer didn't have a valid
termination test. Sheesh. Also get some more numbers out of the example/load test program which drives traffic. This should give some useful insights into how the current http throttle works (or doesn't) with varying client demands.
Diffstat (limited to 'indra/llcorehttp/_httpoprequest.cpp')
-rwxr-xr-xindra/llcorehttp/_httpoprequest.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/indra/llcorehttp/_httpoprequest.cpp b/indra/llcorehttp/_httpoprequest.cpp
index 8cb7fee701..ce0fc605ab 100755
--- a/indra/llcorehttp/_httpoprequest.cpp
+++ b/indra/llcorehttp/_httpoprequest.cpp
@@ -1025,13 +1025,15 @@ char * os_strtrim(char * lstr)
}
if (*lstr)
{
- for (char * rstr(lstr + strlen(lstr)); *--rstr;)
+ char * rstr(lstr + strlen(lstr));
+ while (lstr < rstr && *--rstr)
{
if (' ' == *rstr || '\t' == *rstr)
{
*rstr = '\0';
}
}
+ llassert(lstr <= rstr);
}
return lstr;
}