aboutsummaryrefslogtreecommitdiffstats
path: root/pbx/pbx_ael.c
diff options
context:
space:
mode:
authormurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-01 20:27:52 +0000
committermurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-01 20:27:52 +0000
commit662cae0c397d15d9d4f5ec30099fb07e711a7f26 (patch)
tree0a24f58db229ef47a1dee590a204f28aff967d14 /pbx/pbx_ael.c
parent894a29908b919b808a4cffe77bc63db8cc50323b (diff)
closes issue #10777 -- by returning a null for the parse tree when there's really nothing there, and making sure we don't try to do checking on a null tree.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@84239 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx/pbx_ael.c')
-rw-r--r--pbx/pbx_ael.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/pbx/pbx_ael.c b/pbx/pbx_ael.c
index ff9b95edb..af55c9315 100644
--- a/pbx/pbx_ael.c
+++ b/pbx/pbx_ael.c
@@ -109,9 +109,9 @@ void destroy_pval_item(pval *item);
int is_float(char *arg );
int is_int(char *arg );
int is_empty(char *arg);
-static pval *current_db;
-static pval *current_context;
-static pval *current_extension;
+static pval *current_db=0;
+static pval *current_context=0;
+static pval *current_extension=0;
static const char *match_context;
static const char *match_exten;
@@ -2733,6 +2733,8 @@ static void ael2_semantic_check(pval *item, int *arg_errs, int *arg_warns, int *
#endif
struct argapp *apps=0;
+ if (!item)
+ return; /* don't check an empty tree */
#ifdef AAL_ARGCHECK
rfilename = alloca(10 + strlen(ast_config_AST_VAR_DIR));
sprintf(rfilename, "%s/applist", ast_config_AST_VAR_DIR);