[svn-commits] mmichelson: branch 1.4 r89205 - /branches/1.4/apps/app_mixmonitor.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Mon Nov 12 18:56:46 CST 2007
Author: mmichelson
Date: Mon Nov 12 18:56:46 2007
New Revision: 89205
URL: http://svn.digium.com/view/asterisk?view=rev&rev=89205
Log:
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.
Modified:
branches/1.4/apps/app_mixmonitor.c
Modified: branches/1.4/apps/app_mixmonitor.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_mixmonitor.c?view=diff&rev=89205&r1=89204&r2=89205
==============================================================================
--- branches/1.4/apps/app_mixmonitor.c (original)
+++ branches/1.4/apps/app_mixmonitor.c Mon Nov 12 18:56:46 2007
@@ -332,7 +332,7 @@
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);
@@ -378,7 +378,7 @@
}
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 : "");
ast_module_user_remove(u);
More information about the svn-commits
mailing list