提交 6fcf2cc5 authored 作者: Anthony Minessale's avatar Anthony Minessale 提交者: Ken Rice

fix wrong len in ESL sendMSG method

上级 d2d71759
...@@ -568,11 +568,10 @@ ESL_DECLARE(esl_status_t) esl_sendmsg(esl_handle_t *handle, esl_event_t *event, ...@@ -568,11 +568,10 @@ ESL_DECLARE(esl_status_t) esl_sendmsg(esl_handle_t *handle, esl_event_t *event,
assert(cmd_buf); assert(cmd_buf);
memset(cmd_buf, 0, len); memset(cmd_buf, 0, len);
if (uuid) { if (uuid) {
snprintf(cmd_buf, sizeof(cmd_buf), "sendmsg %s\n%s", uuid, txt); snprintf(cmd_buf, len, "sendmsg %s\n%s", uuid, txt);
} else { } else {
snprintf(cmd_buf, sizeof(cmd_buf), "sendmsg\n%s", txt); snprintf(cmd_buf, len, "sendmsg\n%s", txt);
} }
esl_log(ESL_LOG_DEBUG, "%s%s\n", cmd_buf, txt); esl_log(ESL_LOG_DEBUG, "%s%s\n", cmd_buf, txt);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论