diff options
author | jrose <jrose@f38db490-d61c-443f-a65b-d21fe96a405b> | 2011-03-08 20:34:05 +0000 |
---|---|---|
committer | jrose <jrose@f38db490-d61c-443f-a65b-d21fe96a405b> | 2011-03-08 20:34:05 +0000 |
commit | cb8c826815fb2f0fa630119a308c24828046ec5d (patch) | |
tree | 7025b0fd413e473e25d5e79d7ac9bb84960a0912 /channels/sip | |
parent | 2e447e23792e5a4dc4e492daa5c97ecdd090da90 (diff) |
Merged revisions 310088 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r310088 | jrose | 2011-03-08 14:19:32 -0600 (Tue, 08 Mar 2011) | 9 lines
Returns with an error notice if CHANNEL function of SIP channel is read without arguments.
(Closes issue #18653)
Reported by: wuwu
Patches:
diff.patch uploaded by jrose (license 1225)
Tested by: jrose
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@310089 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/sip')
-rw-r--r-- | channels/sip/dialplan_functions.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/channels/sip/dialplan_functions.c b/channels/sip/dialplan_functions.c index abf83e7d4..0d019c543 100644 --- a/channels/sip/dialplan_functions.c +++ b/channels/sip/dialplan_functions.c @@ -47,6 +47,13 @@ int sip_acf_channel_read(struct ast_channel *chan, const char *funcname, char *p AST_APP_ARG(type); AST_APP_ARG(field); ); + + /* Check for zero arguments */ + if (ast_strlen_zero(parse)) { + ast_log(LOG_ERROR, "Cannot call %s without arguments\n", funcname); + return -1; + } + AST_STANDARD_APP_ARGS(args, parse); /* Sanity check */ |