aboutsummaryrefslogtreecommitdiffstats
path: root/utils/muted.c
diff options
context:
space:
mode:
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 6a7569557..14bb156e3 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;
}