aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_queue.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-08-10 19:25:03 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-08-10 19:25:03 +0000
commitdbef80dfa2752f6306e45af841d5573ccfd14f03 (patch)
tree638d77074098ba848a915b044a9c6b4d12efb4ca /apps/app_queue.c
parent55ecd87dff70a3ca8ff715adae8d95b68c238e26 (diff)
AST-2009-005
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@211551 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_queue.c')
-rw-r--r--apps/app_queue.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index c5df947e0..1ce2fc61f 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -4588,7 +4588,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;
}
@@ -4749,7 +4749,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) {
ast_debug(1, "%s: Got priority %d from ${QUEUE_PRIO}.\n", chan->name, prio);
} else {
ast_log(LOG_WARNING, "${QUEUE_PRIO}: Invalid value (%s), channel %s.\n",
@@ -4764,7 +4764,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) {
ast_debug(1, "%s: Got max penalty %d from ${QUEUE_MAX_PENALTY}.\n", chan->name, max_penalty);
} else {
ast_log(LOG_WARNING, "${QUEUE_MAX_PENALTY}: Invalid value (%s), channel %s.\n",
@@ -4776,7 +4776,7 @@ static int queue_exec(struct ast_channel *chan, void *data)
}
if ((min_penalty_str = pbx_builtin_getvar_helper(chan, "QUEUE_MIN_PENALTY"))) {
- if (sscanf(min_penalty_str, "%d", &min_penalty) == 1) {
+ if (sscanf(min_penalty_str, "%30d", &min_penalty) == 1) {
ast_debug(1, "%s: Got min penalty %d from ${QUEUE_MIN_PENALTY}.\n", chan->name, min_penalty);
} else {
ast_log(LOG_WARNING, "${QUEUE_MIN_PENALTY}: Invalid value (%s), channel %s.\n",
@@ -6046,7 +6046,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))
@@ -6238,7 +6238,7 @@ static char *handle_queue_add_member(struct ast_cli_entry *e, int cmd, struct as
queuename = a->argv[5];
interface = a->argv[3];
if (a->argc >= 8) {
- if (sscanf(a->argv[7], "%d", &penalty) == 1) {
+ if (sscanf(a->argv[7], "%30d", &penalty) == 1) {
if (penalty < 0) {
ast_cli(a->fd, "Penalty must be >= 0\n");
penalty = 0;