From: Andrew Thompson Date: Sun, 17 Oct 2010 20:19:38 +0000 (-0400) Subject: Arrays are 0 indexed in C, duh X-Git-Tag: v1.2-rc1~265^2~11^2~158 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc40a7789c5edbcded79b14a57e8527beb5a0426;p=thirdparty%2Ffreeswitch.git Arrays are 0 indexed in C, duh --- diff --git a/src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c b/src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c index f2a20f34c9..8565e1afa7 100644 --- a/src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c +++ b/src/mod/event_handlers/mod_erlang_event/mod_erlang_event.c @@ -1041,7 +1041,7 @@ static int read_cookie_from_file(char *filename) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unable to read cookie file %s : %d.\n", filename, errno); } - cookie[MAXATOMLEN+1] = '\0'; + cookie[MAXATOMLEN] = '\0'; /* replace any end of line characters with a null */ if ((end = strchr(cookie, '\n'))) {