diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-08-10 19:15:57 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-08-10 19:15:57 +0000 |
commit | 8cae492343324ae845b8b19d78b253d824eac10f (patch) | |
tree | 3d0ab9b89a652c8bde68776be0e8b945b81aaa6b /apps/app_queue.c | |
parent | 9f4c1d7a4e1ee5f0ea1b21af53eb7357366ff661 (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 'apps/app_queue.c')
-rw-r--r-- | apps/app_queue.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c index 4d2eb6204..63cb4b082 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -3822,7 +3822,7 @@ static int aqm_exec(struct ast_channel *chan, void *data) } if (!ast_strlen_zero(args.penalty)) { - if ((sscanf(args.penalty, "%d", &penalty) != 1) || penalty < 0) { + if ((sscanf(args.penalty, "%30d", &penalty) != 1) || penalty < 0) { ast_log(LOG_WARNING, "Penalty '%s' is invalid, must be an integer >= 0\n", args.penalty); penalty = 0; } @@ -3961,7 +3961,7 @@ static int queue_exec(struct ast_channel *chan, void *data) /* Get the priority from the variable ${QUEUE_PRIO} */ user_priority = pbx_builtin_getvar_helper(chan, "QUEUE_PRIO"); if (user_priority) { - if (sscanf(user_priority, "%d", &prio) == 1) { + if (sscanf(user_priority, "%30d", &prio) == 1) { if (option_debug) ast_log(LOG_DEBUG, "%s: Got priority %d from ${QUEUE_PRIO}.\n", chan->name, prio); @@ -3978,7 +3978,7 @@ static int queue_exec(struct ast_channel *chan, void *data) /* Get the maximum penalty from the variable ${QUEUE_MAX_PENALTY} */ if ((max_penalty_str = pbx_builtin_getvar_helper(chan, "QUEUE_MAX_PENALTY"))) { - if (sscanf(max_penalty_str, "%d", &max_penalty) == 1) { + if (sscanf(max_penalty_str, "%30d", &max_penalty) == 1) { if (option_debug) ast_log(LOG_DEBUG, "%s: Got max penalty %d from ${QUEUE_MAX_PENALTY}.\n", chan->name, max_penalty); @@ -4865,7 +4865,7 @@ static int manager_add_queue_member(struct mansession *s, const struct message * if (ast_strlen_zero(penalty_s)) penalty = 0; - else if (sscanf(penalty_s, "%d", &penalty) != 1 || penalty < 0) + else if (sscanf(penalty_s, "%30d", &penalty) != 1 || penalty < 0) penalty = 0; if (ast_strlen_zero(paused_s)) @@ -4969,7 +4969,7 @@ static int handle_queue_add_member(int fd, int argc, char *argv[]) queuename = argv[5]; interface = argv[3]; if (argc >= 8) { - if (sscanf(argv[7], "%d", &penalty) == 1) { + if (sscanf(argv[7], "%30d", &penalty) == 1) { if (penalty < 0) { ast_cli(fd, "Penalty must be >= 0\n"); penalty = 0; |