提交 3f06bbd0 authored 作者: William King's avatar William King

This was writing a null one space to the right, outside of the malloc'd buffer.…

This was writing a null one space to the right, outside of the malloc'd buffer. On further review this uses apr_vsnprintf which always returns null terminated.
上级 de0fea31
......@@ -185,8 +185,6 @@ SWITCH_DECLARE(char *) switch_find_parameter(const char *str, const char *param,
r = malloc(mlen);
}
*(r + mlen) = '\0';
switch_snprintf(r, mlen, "%s", ptr);
break;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论