aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-10-16 23:34:37 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-10-16 23:34:37 +0000
commitb51502e30acccca75fe5ecc3949abc54d52bea2e (patch)
treea673510b23b599617117cdf4d90a9551fd68bb2c
parent5bedaf270f766b700b0a490e53b8a10d25938883 (diff)
Don't try to call a dialplan function's read callback from
the manager's GetVar handler if an invalid channel has been specified. Several dialplan functions, including CHANNEL and SIP_HEADER, do not check for NULL-ness of the channel being passed in. (closes issue #13715) Reported by: makoto git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@150298 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--main/manager.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/main/manager.c b/main/manager.c
index 8b10712e8..98f7a61f1 100644
--- a/main/manager.c
+++ b/main/manager.c
@@ -1499,7 +1499,9 @@ static int action_getvar(struct mansession *s, const struct message *m)
if (varname[strlen(varname) - 1] == ')') {
char *copy = ast_strdupa(varname);
-
+ if (!c) {
+ astman_send_error(s, m, "No such channel");
+ }
ast_func_read(c, copy, workspace, sizeof(workspace));
varval = workspace;
} else {