From e04884545cdeffaf0eafa5253dc1c50e54bd8b9f Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Mon, 21 Nov 2005 00:03:40 +0000 Subject: [PATCH] issue #5806 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-2@7155 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- ChangeLog | 2 ++ pbx/pbx_spool.c | 12 ++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 655835e72e..b49e9b180b 100755 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2005-11-20 Russell Bryant + * pbx/pbx_spool.c: Fix crash when a value is not specified with a variable on a Set: line in a call file. (issue #5806) + * apps/app_meetme.c: Fix the 'X' option to the MeetMe application. (issue #5773) * apps/app_voicemail.c: Correct the use of a mailbox entered by the calling party instead of indicated as an argument to the Voicemail application. (issue #5774) diff --git a/pbx/pbx_spool.c b/pbx/pbx_spool.c index 96531b5f95..b9af5d81bb 100755 --- a/pbx/pbx_spool.c +++ b/pbx/pbx_spool.c @@ -202,10 +202,14 @@ 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 Set: argument! Should be Set: Variable=value\n"); } } else if (!strcasecmp(buf, "account")) { var = ast_variable_new("CDR(accountcode|r)", c);