提交 dd1f9417 authored 作者: Anthony Minessale's avatar Anthony Minessale

update

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3458 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 57dd6da1
...@@ -1196,19 +1196,19 @@ SWITCH_DECLARE(char *) switch_channel_expand_variables(switch_channel_t *channel ...@@ -1196,19 +1196,19 @@ SWITCH_DECLARE(char *) switch_channel_expand_variables(switch_channel_t *channel
return in; return in;
} }
} }
nlen = sub_val ? strlen(sub_val) : 0; if ((nlen = sub_val ? strlen(sub_val) : 0)) {
if (len + nlen >= olen) {
if (len + nlen >= olen) { olen = (olen + len + nlen + block);
olen = (olen + len + nlen + block); cpos = c - data;
cpos = c - data; data = realloc(data, olen);
data = realloc(data, olen); c = data + cpos;
c = data + cpos; memset(c, 0, olen - cpos);
memset(c, 0, olen - cpos); }
}
if (nlen) {
len += nlen; len += nlen;
strcat(c, sub_val); strcat(c, sub_val);
c += nlen; c += nlen;
} }
switch_safe_free(func_val); switch_safe_free(func_val);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论