From: Mark Michelson Date: Thu, 16 Oct 2008 23:34:37 +0000 (+0000) Subject: Don't try to call a dialplan function's read callback from X-Git-Tag: 1.4.23-rc1~29 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e9035cc286adf5d099aa5887520d4ab1785f3698;p=thirdparty%2Fasterisk.git 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: https://origsvn.digium.com/svn/asterisk/branches/1.4@150298 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/manager.c b/main/manager.c index 8b10712e8d..98f7a61f12 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 {