aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_controlplayback.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-26 14:31:32 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-26 14:31:32 +0000
commitb8f8021a8ad2f253873dd35867280ac4e37a1a40 (patch)
tree26354eb7d7e4d7b50343663ea7651d738b88236a /apps/app_controlplayback.c
parent18ff1ee386dcc025ae7833037571ec211ce92206 (diff)
Don't crash if the 'o' option of ControlPlayback is used without any value.
(closes issue #11375) Reported by: johan git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89570 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_controlplayback.c')
-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 edf10a182..80df5926d 100644
--- a/apps/app_controlplayback.c
+++ b/apps/app_controlplayback.c
@@ -124,7 +124,7 @@ static int controlplayback_exec(struct ast_channel *chan, void *data)
if (args.options) {
ast_app_parse_options(cpb_opts, &opts, opt_args, args.options);
- if (ast_test_flag(&opts, OPT_OFFSET))
+ if (ast_test_flag(&opts, OPT_OFFSET) && !ast_strlen_zero(opt_args[OPT_ARG_OFFSET]))
offsetms = atol(opt_args[OPT_ARG_OFFSET]);
}