[svn-commits] file: branch 1.4 r86754 - /branches/1.4/apps/app_controlplayback.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Oct 22 11:15:18 CDT 2007


Author: file
Date: Mon Oct 22 11:15:18 2007
New Revision: 86754

URL: http://svn.digium.com/view/asterisk?view=rev&rev=86754
Log:
Make sure res is a positive value before performing the check to determine whether the user stopped it or not.
(closes issue #11023)
Reported by: cfc

Modified:
    branches/1.4/apps/app_controlplayback.c

Modified: branches/1.4/apps/app_controlplayback.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_controlplayback.c?view=diff&rev=86754&r1=86753&r2=86754
==============================================================================
--- branches/1.4/apps/app_controlplayback.c (original)
+++ branches/1.4/apps/app_controlplayback.c Mon Oct 22 11:15:18 2007
@@ -132,7 +132,7 @@
 	res = ast_control_streamfile(chan, argv[arg_file], argv[arg_fwd], argv[arg_rev], argv[arg_stop], argv[arg_pause], argv[arg_restart], skipms);
 
 	/* If we stopped on one of our stop keys, return 0  */
-	if (argv[arg_stop] && strchr(argv[arg_stop], res)) {
+	if (res > 0 && argv[arg_stop] && strchr(argv[arg_stop], res)) {
 		res = 0;
 		pbx_builtin_setvar_helper(chan, "CPLAYBACKSTATUS", "USERSTOPPED");
 	} else {




More information about the svn-commits mailing list