From: Josh Roberson Date: Sun, 20 Nov 2005 06:59:42 +0000 (+0000) Subject: issue #5806 X-Git-Tag: 1.4.0-beta1~3282 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39407c4366ac8b6afd5e1ffed3b7c8fe7d65e1ee;p=thirdparty%2Fasterisk.git issue #5806 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7143 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/ChangeLog b/ChangeLog index 4368877fe0..8096a223e5 100755 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2005-11-20 Josh Roberson + * pbx/pbx_spool.c: Fix crash in spooler if set/setvar declared incorrectly. (issue #5806) + * apps/app_meetme.c: fix 'X' option in MeetMe, with slight modification. (issue #5773) * apps/app_voicemail.c: Make sure we're copying the read digits when calling voicemail without a box. (issue #5774) diff --git a/pbx/pbx_spool.c b/pbx/pbx_spool.c index 96531b5f95..4af23c4006 100755 --- a/pbx/pbx_spool.c +++ b/pbx/pbx_spool.c @@ -202,11 +202,16 @@ static int apply_outgoing(struct outgoing *o, char *fn, FILE *f) } else if (!strcasecmp(buf, "setvar") || !strcasecmp(buf, "set")) { c2 = c; strsep(&c2, "="); - var = ast_variable_new(c, c2); - if (var) { - var->next = o->vars; - o->vars = var; + if (c2) + { + var = ast_variable_new(c, c2); + if (var) { + var->next = o->vars; + o->vars = var; + } } + else + ast_log(LOG_WARNING, "Malformed \"%s\" argument. Should be \"%s: variable=value\"\n", buf, buf); } else if (!strcasecmp(buf, "account")) { var = ast_variable_new("CDR(accountcode|r)", c); if (var) {