aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-22 16:15:18 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-10-22 16:15:18 +0000
commitac67cd955b39961563a5e4492216f2709d42b838 (patch)
tree8c0015d86cc02505ff5346015c6e9f0067781d71 /apps
parent310ee0a94551a90f9365346ddb8694243eda0d5f (diff)
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 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@86754 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_controlplayback.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/app_controlplayback.c b/apps/app_controlplayback.c
index 8a5a845cd..6f2c03315 100644
--- a/apps/app_controlplayback.c
+++ b/apps/app_controlplayback.c
@@ -132,7 +132,7 @@ static int controlplayback_exec(struct ast_channel *chan, void *data)
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 {