aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/strings.h
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-28 16:36:59 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-28 16:36:59 +0000
commitc94405d5d87eb0875f5eb3941d50059fb55c8e2d (patch)
treefc8e0f26a840d8ca90e1d0e068d2fb9744c4eff9 /include/asterisk/strings.h
parent1b359aad73a5cb02730616692b5ab2715bdf3ad8 (diff)
The copy_request function did not take into account the necessary null terminator
for the string to be copied into. This resulted in parse_request reading invalid memory beyond the end of the string, and in some cases led to crashes. Thanks to falves11 for providing the valgrind output which led to the closure of this issue. (closes issue #12284) Reported by: falves11 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@111662 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/strings.h')
-rw-r--r--include/asterisk/strings.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/asterisk/strings.h b/include/asterisk/strings.h
index 226c7bb67..fbff083ab 100644
--- a/include/asterisk/strings.h
+++ b/include/asterisk/strings.h
@@ -326,7 +326,7 @@ int ast_get_timeval(const char *src, struct timeval *tv, struct timeval _default
*/
struct ast_str {
size_t len; /*!< The current maximum length of the string */
- size_t used; /*!< Amount of space used */
+ size_t used; /*!< Amount of space used. Does not include string's null terminator */
struct ast_threadstorage *ts; /*!< What kind of storage is this ? */
#define DS_MALLOC ((struct ast_threadstorage *)1)
#define DS_ALLOCA ((struct ast_threadstorage *)2)