From 0a58b6f090e35416038b228aba00cad23499770d Mon Sep 17 00:00:00 2001 From: tilghman Date: Mon, 10 Aug 2009 19:30:55 +0000 Subject: AST-2009-005 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@211569 f38db490-d61c-443f-a65b-d21fe96a405b --- pbx/pbx_spool.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'pbx/pbx_spool.c') diff --git a/pbx/pbx_spool.c b/pbx/pbx_spool.c index 64c176769..34010e752 100644 --- a/pbx/pbx_spool.c +++ b/pbx/pbx_spool.c @@ -171,7 +171,7 @@ static int apply_outgoing(struct outgoing *o, char *fn, FILE *f) } else if (!strcasecmp(buf, "data")) { ast_copy_string(o->data, c, sizeof(o->data)); } else if (!strcasecmp(buf, "maxretries")) { - if (sscanf(c, "%d", &o->maxretries) != 1) { + if (sscanf(c, "%30d", &o->maxretries) != 1) { ast_log(LOG_WARNING, "Invalid max retries at line %d of %s\n", lineno, fn); o->maxretries = 0; } @@ -182,24 +182,24 @@ static int apply_outgoing(struct outgoing *o, char *fn, FILE *f) } else if (!strcasecmp(buf, "extension")) { ast_copy_string(o->exten, c, sizeof(o->exten)); } else if (!strcasecmp(buf, "priority")) { - if ((sscanf(c, "%d", &o->priority) != 1) || (o->priority < 1)) { + if ((sscanf(c, "%30d", &o->priority) != 1) || (o->priority < 1)) { ast_log(LOG_WARNING, "Invalid priority at line %d of %s\n", lineno, fn); o->priority = 1; } } else if (!strcasecmp(buf, "retrytime")) { - if ((sscanf(c, "%d", &o->retrytime) != 1) || (o->retrytime < 1)) { + if ((sscanf(c, "%30d", &o->retrytime) != 1) || (o->retrytime < 1)) { ast_log(LOG_WARNING, "Invalid retrytime at line %d of %s\n", lineno, fn); o->retrytime = 300; } } else if (!strcasecmp(buf, "waittime")) { - if ((sscanf(c, "%d", &o->waittime) != 1) || (o->waittime < 1)) { + if ((sscanf(c, "%30d", &o->waittime) != 1) || (o->waittime < 1)) { ast_log(LOG_WARNING, "Invalid waittime at line %d of %s\n", lineno, fn); o->waittime = 45; } } else if (!strcasecmp(buf, "retry")) { o->retries++; } else if (!strcasecmp(buf, "startretry")) { - if (sscanf(c, "%ld", &o->callingpid) != 1) { + if (sscanf(c, "%30ld", &o->callingpid) != 1) { ast_log(LOG_WARNING, "Unable to retrieve calling PID!\n"); o->callingpid = 0; } -- cgit v1.2.3