From 27ab9bdd823388c62d1b1954b972f50c4e31f637 Mon Sep 17 00:00:00 2001 From: Joshua Colp Date: Mon, 22 Oct 2007 16:15:18 +0000 Subject: [PATCH] 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: https://origsvn.digium.com/svn/asterisk/branches/1.4@86754 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_controlplayback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/app_controlplayback.c b/apps/app_controlplayback.c index 8a5a845cde..6f2c033152 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 {