[asterisk-bugs] [Asterisk 0011023]: False detection of USERSTOPPED status
noreply at bugs.digium.com
noreply at bugs.digium.com
Mon Oct 22 07:09:12 CDT 2007
The following issue has been REOPENED.
======================================================================
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: feedback
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 07:09 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)
======================================================================
----------------------------------------------------------------------
cfc - 10-22-07 07:09
----------------------------------------------------------------------
r86502 seems to don't fix the issue :
casting a 0 ('\0') as a char is still equal to 0
res should be tested to be > 0 so strchr will not match the end of string
('\0') of arg_stop in controlplayback_exec()
Issue History
Date Modified Username Field Change
======================================================================
10-22-07 07:09 cfc Note Added: 0072330
======================================================================
More information about the asterisk-bugs
mailing list