null terminating snprintf

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10907 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris
2008-12-22 16:27:39 +00:00
parent d72a4ea77d
commit 6881efcf6c
4 changed files with 23 additions and 3 deletions

View File

@@ -481,7 +481,7 @@ esl_status_t esl_event_serialize(esl_event_t *event, char **str, esl_bool_t enco
if (encode) {
esl_url_encode(hp->value, encode_buf, encode_len);
} else {
snprintf(encode_buf, encode_len, "[%s]", hp->value);
esl_snprintf(encode_buf, encode_len, "[%s]", hp->value);
}
llen = strlen(hp->name) + strlen(encode_buf) + 8;