aboutsummaryrefslogtreecommitdiffstats
path: root/utils/muted.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-08-10 19:15:57 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-08-10 19:15:57 +0000
commit8cae492343324ae845b8b19d78b253d824eac10f (patch)
tree3d0ab9b89a652c8bde68776be0e8b945b81aaa6b /utils/muted.c
parent9f4c1d7a4e1ee5f0ea1b21af53eb7357366ff661 (diff)
AST-2009-005
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@211528 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'utils/muted.c')
-rw-r--r--utils/muted.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/muted.c b/utils/muted.c
index 5aa7a79d7..be276fdf4 100644
--- a/utils/muted.c
+++ b/utils/muted.c
@@ -156,7 +156,7 @@ static int load_config(void)
} else if (!strcasecmp(buf, "smoothfade")) {
smoothfade = 1;
} else if (!strcasecmp(buf, "mutelevel")) {
- if (val && (sscanf(val, "%d", &x) == 1) && (x > -1) && (x < 101)) {
+ if (val && (sscanf(val, "%3d", &x) == 1) && (x > -1) && (x < 101)) {
mutelevel = x;
} else
fprintf(stderr, "mutelevel must be a number from 0 (most muted) to 100 (no mute) at line %d\n", lineno);
@@ -216,7 +216,7 @@ static int connect_asterisk(void)
if (ports) {
*ports = '\0';
ports++;
- if ((sscanf(ports, "%d", &port) != 1) || (port < 1) || (port > 65535)) {
+ if ((sscanf(ports, "%5d", &port) != 1) || (port < 1) || (port > 65535)) {
fprintf(stderr, "'%s' is not a valid port number in the hostname\n", ports);
return -1;
}