diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-11-13 00:57:34 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-11-13 00:57:34 +0000 |
commit | 5dfa041c8839b6f12e513391a6d20cd3c6bf3852 (patch) | |
tree | c30c3d27caab6614fdad5c71973e87c253cfdf71 /apps/app_mixmonitor.c | |
parent | f13c4e97f3ebb88d70a7858b6475a53c11ab5e59 (diff) |
Merged revisions 89205 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r89205 | mmichelson | 2007-11-12 18:56:46 -0600 (Mon, 12 Nov 2007) | 5 lines
Some sanity checking for MixMonitor. If only 1 argument is given, then the args.options
and args.post_process strings are uninitialized and could contain garbage. This change
handles this situation properly by only using arguments that we have parsed.
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89206 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_mixmonitor.c')
-rw-r--r-- | apps/app_mixmonitor.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/app_mixmonitor.c b/apps/app_mixmonitor.c index 1583566fb..020386a0d 100644 --- a/apps/app_mixmonitor.c +++ b/apps/app_mixmonitor.c @@ -309,7 +309,7 @@ static int mixmonitor_exec(struct ast_channel *chan, void *data) return -1; } - if (args.options) { + if (args.argc > 1 && args.options) { char *opts[OPT_ARG_ARRAY_SIZE] = { NULL, }; ast_app_parse_options(mixmonitor_opts, &flags, opts, args.options); @@ -360,7 +360,7 @@ static int mixmonitor_exec(struct ast_channel *chan, void *data) ast_mkdir(tmp, 0777); pbx_builtin_setvar_helper(chan, "MIXMONITOR_FILENAME", args.filename); - launch_monitor_thread(chan, args.filename, flags.flags, readvol, writevol, args.post_process); + launch_monitor_thread(chan, args.filename, flags.flags, readvol, writevol, args.argc > 2 ? args.post_process : ""); return 0; } |