[asterisk-bugs] [Asterisk 0011023]: False detection of USERSTOPPED status

noreply at bugs.digium.com noreply at bugs.digium.com
Mon Oct 22 10:54:24 CDT 2007


The following issue has been ASSIGNED. 
====================================================================== 
http://bugs.digium.com/view.php?id=11023 
====================================================================== 
Reported By:                cfc
Assigned To:                file
====================================================================== 
Project:                    Asterisk
Issue ID:                   11023
Category:                   Applications/app_controlplayback
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
Asterisk Version:            SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  1.4  
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             10-18-2007 06:16 CDT
Last Modified:              10-22-2007 10:54 CDT
====================================================================== 
Summary:                    False detection of USERSTOPPED status
Description: 
in app_controlplayback.c, function controlplayback_exec() : 

       /* If we stopped on one of our stop keys, return 0  */
 	        if (argv[arg_stop] && strchr(argv[arg_stop], res)) {

res is not checked to be > 0.
In the case the user listen the file without pressing a stop key,
ast_control_streamfile will return 0.
In this case, strchr will match the end of string of arg_stop and
CPLAYBACKSTATUS will be wrongly set to USERSTOPPED (should be SUCCESS)


====================================================================== 

---------------------------------------------------------------------- 
 svnbot - 10-22-07 10:54  
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 86754

U   branches/1.4/apps/app_controlplayback.c

------------------------------------------------------------------------
r86754 | file | 2007-10-22 10:54:23 -0500 (Mon, 22 Oct 2007) | 4 lines

Make sure res is a positive value before performing the check to determine
whether the user stopped it or not.
(closes issue http://bugs.digium.com/view.php?id=11023)
Reported by: cfc

------------------------------------------------------------------------ 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
10-22-07 10:54  svnbot         Checkin                                      
10-22-07 10:54  svnbot         Note Added: 0072359                          
10-22-07 10:54  svnbot         Status                   feedback => assigned
======================================================================




More information about the asterisk-bugs mailing list