dect
/
asterisk
Archived
13
0
Fork 0

Merged revisions 150298,150301 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r150298 | mmichelson | 2008-10-16 18:34:37 -0500 (Thu, 16 Oct 2008) | 10 lines

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


........
r150301 | mmichelson | 2008-10-16 18:35:07 -0500 (Thu, 16 Oct 2008) | 3 lines

And don't forget to return on the error condition


........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@150302 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
mmichelson 2008-10-16 23:36:49 +00:00
parent 62e689a46a
commit 70265ca2bb
1 changed files with 4 additions and 0 deletions

View File

@ -1805,6 +1805,10 @@ static int action_getvar(struct mansession *s, const struct message *m)
}
if (varname[strlen(varname) - 1] == ')') {
if (!c) {
astman_send_error(s, m, "No such channel");
return 0;
}
ast_func_read(c, (char *) varname, workspace, sizeof(workspace));
varval = workspace;
} else {