projects
/
asterisk/asterisk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
when calling this function to append to a dynamic string and the buffer was not
[asterisk/asterisk.git]
/
main
/
utils.c
diff --git
a/main/utils.c
b/main/utils.c
index
feb4a62
..
3a8e85f
100644
(file)
--- a/
main/utils.c
+++ b/
main/utils.c
@@
-1219,6
+1219,9
@@
int ast_dynamic_str_thread_build_va(struct ast_dynamic_str **buf, size_t max_len
if (!(*buf = ast_realloc(*buf, (*buf)->len + sizeof(*(*buf)))))
return AST_DYNSTR_BUILD_FAILED;
+ if (append)
+ (*buf)->str[offset] = '\0';
+
if (ts)
pthread_setspecific(ts->key, *buf);