[asterisk-commits] file: trunk r89570 - /trunk/apps/app_controlplayback.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Nov 26 08:31:33 CST 2007


Author: file
Date: Mon Nov 26 08:31:32 2007
New Revision: 89570

URL: http://svn.digium.com/view/asterisk?view=rev&rev=89570
Log:
Don't crash if the 'o' option of ControlPlayback is used without any value.
(closes issue #11375)
Reported by: johan

Modified:
    trunk/apps/app_controlplayback.c

Modified: trunk/apps/app_controlplayback.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_controlplayback.c?view=diff&rev=89570&r1=89569&r2=89570
==============================================================================
--- trunk/apps/app_controlplayback.c (original)
+++ trunk/apps/app_controlplayback.c Mon Nov 26 08:31:32 2007
@@ -124,7 +124,7 @@
 
 	if (args.options) {
 		ast_app_parse_options(cpb_opts, &opts, opt_args, args.options);		
-		if (ast_test_flag(&opts, OPT_OFFSET))
+		if (ast_test_flag(&opts, OPT_OFFSET) && !ast_strlen_zero(opt_args[OPT_ARG_OFFSET]))
 			offsetms = atol(opt_args[OPT_ARG_OFFSET]);
 	}
 




More information about the asterisk-commits mailing list