aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_musiconhold.c
diff options
context:
space:
mode:
Diffstat (limited to 'res/res_musiconhold.c')
-rw-r--r--res/res_musiconhold.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c
index a2f0da3c7..e0d7c190a 100644
--- a/res/res_musiconhold.c
+++ b/res/res_musiconhold.c
@@ -649,7 +649,7 @@ static int play_moh_exec(struct ast_channel *chan, void *data)
AST_STANDARD_APP_ARGS(args, parse);
if (!ast_strlen_zero(args.duration)) {
- if (sscanf(args.duration, "%d", &timeout) == 1) {
+ if (sscanf(args.duration, "%30d", &timeout) == 1) {
timeout *= 1000;
} else {
ast_log(LOG_WARNING, "Invalid MusicOnHold duration '%s'. Will wait indefinitely.\n", args.duration);