projects
/
asterisk/asterisk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f0e0963
)
don't try to get the length of the string in the ast_dynamic_str object unless we...
author
Kevin P. Fleming
<kpfleming@digium.com>
Thu, 7 Sep 2006 00:41:27 +0000
(
00:41
+0000)
committer
Kevin P. Fleming
<kpfleming@digium.com>
Thu, 7 Sep 2006 00:41:27 +0000
(
00:41
+0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@42185
65c4cc65
-6c06-0410-ace0-
fbb531ad65f3
main/utils.c
patch
|
blob
|
history
diff --git
a/main/utils.c
b/main/utils.c
index
3a8e85f
..
edb4102
100644
(file)
--- a/
main/utils.c
+++ b/
main/utils.c
@@
-1199,7
+1199,7
@@
int ast_dynamic_str_thread_build_va(struct ast_dynamic_str **buf, size_t max_len
struct ast_threadstorage *ts, int append, const char *fmt, va_list ap)
{
int res;
- int offset = append ? strlen((*buf)->str) : 0;
+ int offset = (append && (*buf)->len) ? strlen((*buf)->str) : 0;
res = vsnprintf((*buf)->str + offset, (*buf)->len - offset, fmt, ap);