From 6fcf2cc5a05a4df0665642558e8681a3ff514824 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 28 Aug 2012 12:04:50 -0500 Subject: [PATCH] fix wrong len in ESL sendMSG method --- libs/esl/src/esl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libs/esl/src/esl.c b/libs/esl/src/esl.c index 22b27836fd..b092991988 100644 --- a/libs/esl/src/esl.c +++ b/libs/esl/src/esl.c @@ -568,11 +568,10 @@ ESL_DECLARE(esl_status_t) esl_sendmsg(esl_handle_t *handle, esl_event_t *event, assert(cmd_buf); memset(cmd_buf, 0, len); - 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 { - 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);