aboutsummaryrefslogtreecommitdiffstats
path: root/pbx.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-08-10 19:12:35 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2009-08-10 19:12:35 +0000
commit248d8c804f87e0405ec66454fe7e0e30db14bb8d (patch)
tree872527e87b8284baaa5d1ab1d447a5551fac6cb0 /pbx.c
parent6684417af1a95717df6f035c0eb6d4242c2d799a (diff)
AST-2009-005
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@211526 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx.c')
-rw-r--r--pbx.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/pbx.c b/pbx.c
index 2b2edc211..bded93549 100644
--- a/pbx.c
+++ b/pbx.c
@@ -950,7 +950,7 @@ static int parse_variable_name(char *var, int *offset, int *length, int *isfunc)
}
pvn_endfor:
if (offsetchar) {
- sscanf(offsetchar, "%d:%d", offset, length);
+ sscanf(offsetchar, "%30d:%30d", offset, length);
return 1;
} else {
return 0;
@@ -3890,11 +3890,11 @@ static void get_timerange(struct ast_timing *i, char *times)
ast_log(LOG_WARNING, "Invalid time range. Assuming no restrictions based on time.\n");
return;
}
- if (sscanf(times, "%d:%d", &s1, &s2) != 2) {
+ if (sscanf(times, "%2d:%2d", &s1, &s2) != 2) {
ast_log(LOG_WARNING, "%s isn't a time. Assuming no restrictions based on time.\n", times);
return;
}
- if (sscanf(e, "%d:%d", &e1, &e2) != 2) {
+ if (sscanf(e, "%2d:%2d", &e1, &e2) != 2) {
ast_log(LOG_WARNING, "%s isn't a time. Assuming no restrictions based on time.\n", e);
return;
}
@@ -4016,7 +4016,7 @@ static unsigned int get_day(char *day)
c++;
}
/* Find the start */
- if (sscanf(day, "%d", &s) != 1) {
+ if (sscanf(day, "%1d", &s) != 1) {
ast_log(LOG_WARNING, "Invalid day '%s', assuming none\n", day);
return 0;
}
@@ -4026,7 +4026,7 @@ static unsigned int get_day(char *day)
}
s--;
if (c) {
- if (sscanf(c, "%d", &e) != 1) {
+ if (sscanf(c, "%1d", &e) != 1) {
ast_log(LOG_WARNING, "Invalid day '%s', assuming none\n", c);
return 0;
}
@@ -5422,7 +5422,7 @@ static void wait_for_hangup(struct ast_channel *chan, void *data)
struct ast_frame *f;
int waittime;
- if (ast_strlen_zero(data) || (sscanf(data, "%d", &waittime) != 1) || (waittime < 0))
+ if (ast_strlen_zero(data) || (sscanf(data, "%30d", &waittime) != 1) || (waittime < 0))
waittime = -1;
if (waittime > -1) {
ast_safe_sleep(chan, waittime * 1000);
@@ -6537,7 +6537,7 @@ int ast_parseable_goto(struct ast_channel *chan, const char *goto_string)
mode = -1;
pri++;
}
- if (sscanf(pri, "%d", &ipri) != 1) {
+ if (sscanf(pri, "%30d", &ipri) != 1) {
if ((ipri = ast_findlabel_extension(chan, context ? context : chan->context, (exten && strcasecmp(exten, "BYEXTENSION")) ? exten : chan->exten,
pri, chan->cid.cid_num)) < 1) {
ast_log(LOG_WARNING, "Priority '%s' must be a number > 0, or valid label\n", pri);