From f0d8297654872643a02b513cd8119ca0bf0ca221 Mon Sep 17 00:00:00 2001 From: Leon de Rooij Date: Fri, 24 Apr 2009 11:39:44 +0200 Subject: [PATCH] freeswitch plugin: Changed malloc and snprintf size to +3 instead of +2 --- src/freeswitch.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/freeswitch.c b/src/freeswitch.c index 52ff0883..e171aa33 100644 --- a/src/freeswitch.c +++ b/src/freeswitch.c @@ -419,7 +419,7 @@ static void fs_submit (const fs_command_t *fc, DEBUG (fm->type); DEBUG ("mv->value"); - //DEBUG (mv->value); + DEBUG (mv->value); value_t values[1]; value_list_t vl = VALUE_LIST_INIT; @@ -448,8 +448,8 @@ static int fs_read_command (fs_command_t *fc) /* can't the following be done nicer ? */ char *line; - line = (char *) malloc (strlen(fc->line)+2); - snprintf(line, strlen(fc->line)+2, "%s\n\n", fc->line); + line = (char *) malloc (strlen(fc->line)+3); + snprintf(line, strlen(fc->line)+3, "%s\n\n", fc->line); esl_send_recv(&esl_handle, line); fc->buffer_fill = 0; -- 2.11.0