From 642bec4d6fea7afad99b6a4853418081137a48ba Mon Sep 17 00:00:00 2001 From: Tilghman Lesher Date: Mon, 10 Aug 2009 19:20:57 +0000 Subject: AST-2009-005 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211539 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_mixmonitor.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'apps/app_mixmonitor.c') diff --git a/apps/app_mixmonitor.c b/apps/app_mixmonitor.c index 10866e358..7c1782bd4 100644 --- a/apps/app_mixmonitor.c +++ b/apps/app_mixmonitor.c @@ -459,7 +459,7 @@ static int mixmonitor_exec(struct ast_channel *chan, const char *data) if (ast_test_flag(&flags, MUXFLAG_READVOLUME)) { if (ast_strlen_zero(opts[OPT_ARG_READVOLUME])) { ast_log(LOG_WARNING, "No volume level was provided for the heard volume ('v') option.\n"); - } else if ((sscanf(opts[OPT_ARG_READVOLUME], "%d", &x) != 1) || (x < -4) || (x > 4)) { + } else if ((sscanf(opts[OPT_ARG_READVOLUME], "%2d", &x) != 1) || (x < -4) || (x > 4)) { ast_log(LOG_NOTICE, "Heard volume must be a number between -4 and 4, not '%s'\n", opts[OPT_ARG_READVOLUME]); } else { readvol = get_volfactor(x); @@ -469,7 +469,7 @@ static int mixmonitor_exec(struct ast_channel *chan, const char *data) if (ast_test_flag(&flags, MUXFLAG_WRITEVOLUME)) { if (ast_strlen_zero(opts[OPT_ARG_WRITEVOLUME])) { ast_log(LOG_WARNING, "No volume level was provided for the spoken volume ('V') option.\n"); - } else if ((sscanf(opts[OPT_ARG_WRITEVOLUME], "%d", &x) != 1) || (x < -4) || (x > 4)) { + } else if ((sscanf(opts[OPT_ARG_WRITEVOLUME], "%2d", &x) != 1) || (x < -4) || (x > 4)) { ast_log(LOG_NOTICE, "Spoken volume must be a number between -4 and 4, not '%s'\n", opts[OPT_ARG_WRITEVOLUME]); } else { writevol = get_volfactor(x); @@ -479,7 +479,7 @@ static int mixmonitor_exec(struct ast_channel *chan, const char *data) if (ast_test_flag(&flags, MUXFLAG_VOLUME)) { if (ast_strlen_zero(opts[OPT_ARG_VOLUME])) { ast_log(LOG_WARNING, "No volume level was provided for the combined volume ('W') option.\n"); - } else if ((sscanf(opts[OPT_ARG_VOLUME], "%d", &x) != 1) || (x < -4) || (x > 4)) { + } else if ((sscanf(opts[OPT_ARG_VOLUME], "%2d", &x) != 1) || (x < -4) || (x > 4)) { ast_log(LOG_NOTICE, "Combined volume must be a number between -4 and 4, not '%s'\n", opts[OPT_ARG_VOLUME]); } else { readvol = writevol = get_volfactor(x); -- cgit v1.2.3