diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-08-10 19:20:57 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-08-10 19:20:57 +0000 |
commit | d1ec1aa57d296243d584ad268d8e61d7d1998569 (patch) | |
tree | 2596a6cb913ad8bd78e4670d298dc1d4682b2d23 /addons | |
parent | 4548c33d84f71a04a0416a26b9f0dea0ae061cc4 (diff) |
AST-2009-005
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@211539 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'addons')
-rw-r--r-- | addons/app_mysql.c | 6 | ||||
-rw-r--r-- | addons/app_saycountpl.c | 2 | ||||
-rw-r--r-- | addons/cdr_mysql.c | 2 | ||||
-rw-r--r-- | addons/chan_ooh323.c | 4 | ||||
-rw-r--r-- | addons/res_config_mysql.c | 2 |
5 files changed, 8 insertions, 8 deletions
diff --git a/addons/app_mysql.c b/addons/app_mysql.c index 3bc027b5e..0b1b58f04 100644 --- a/addons/app_mysql.c +++ b/addons/app_mysql.c @@ -333,7 +333,7 @@ static int aMYSQL_connect(struct ast_channel *chan, char *data) } ctimeout = pbx_builtin_getvar_helper(chan, "MYSQL_TIMEOUT"); - if (ctimeout && sscanf(ctimeout, "%d", &timeout) == 1) { + if (ctimeout && sscanf(ctimeout, "%30d", &timeout) == 1) { mysql_options(mysql, MYSQL_OPT_CONNECT_TIMEOUT, (void *)&timeout); } @@ -408,7 +408,7 @@ static int aMYSQL_nextresult(struct ast_channel *chan, char *data) int connid = -1; AST_NONSTANDARD_APP_ARGS(args, data, ' '); - sscanf(args.connid, "%d", &connid); + sscanf(args.connid, "%30d", &connid); if (args.argc != 3 || connid <= 0) { ast_log(LOG_WARNING, "missing some arguments\n"); @@ -451,7 +451,7 @@ static int aMYSQL_fetch(struct ast_channel *chan, char *data) parse = ast_strdupa(data); AST_NONSTANDARD_APP_ARGS(args, parse, ' '); - sscanf(args.fetchid, "%d", &resultid); + sscanf(args.fetchid, "%30d", &resultid); if (args.resultvar && (resultid >= 0) ) { if ((mysqlres = find_identifier(resultid, AST_MYSQL_ID_RESID)) != NULL) { diff --git a/addons/app_saycountpl.c b/addons/app_saycountpl.c index fd921de1a..915779899 100644 --- a/addons/app_saycountpl.c +++ b/addons/app_saycountpl.c @@ -107,7 +107,7 @@ static int sayword_exec(struct ast_channel *chan, const char *data) return -1; } - if (sscanf(args.num, "%d", &inum) != 1) { + if (sscanf(args.num, "%30d", &inum) != 1) { ast_log(LOG_WARNING, "'%s' is not a valid number\n", args.num); return -1; } diff --git a/addons/cdr_mysql.c b/addons/cdr_mysql.c index 2a3ef4365..a6d37b31d 100644 --- a/addons/cdr_mysql.c +++ b/addons/cdr_mysql.c @@ -383,7 +383,7 @@ static int my_load_config_number(struct ast_config *cfg, const char *category, c tmp = ast_variable_retrieve(cfg, category, variable); - if (!tmp || sscanf(tmp, "%d", field) < 1) + if (!tmp || sscanf(tmp, "%30d", field) < 1) *field = def; return 0; diff --git a/addons/chan_ooh323.c b/addons/chan_ooh323.c index 5dd0cadc8..4aa26c92e 100644 --- a/addons/chan_ooh323.c +++ b/addons/chan_ooh323.c @@ -424,7 +424,7 @@ static struct ooh323_pvt *ooh323_alloc(int callref, char *callToken) /* Possible data values - peername, exten/peername, exten@ip */ -static struct ast_channel *ooh323_request(const char *type, int format, +static struct ast_channel *ooh323_request(const char *type, int format, const struct ast_channel *requestor, void *data, int *cause) { struct ast_channel *chan = NULL; @@ -1886,7 +1886,7 @@ int reload_config(int reload) if (gRTPTimeout <= 0) gRTPTimeout = 60; } else if (!strcasecmp(v->name, "tos")) { - if (sscanf(v->value, "%i", &format) == 1) + if (sscanf(v->value, "%30i", &format) == 1) gTOS = format & 0xff; else if (!strcasecmp(v->value, "lowdelay")) gTOS = IPTOS_LOWDELAY; diff --git a/addons/res_config_mysql.c b/addons/res_config_mysql.c index 462f45aaa..182b9ec27 100644 --- a/addons/res_config_mysql.c +++ b/addons/res_config_mysql.c @@ -245,7 +245,7 @@ static struct tables *find_table(const char *database, const char *tablename) } if ((flen = strchr(ftype, '('))) { - sscanf(flen, "(%d)", &column->len); + sscanf(flen, "(%30d)", &column->len); } else { /* Columns like dates, times, and timestamps don't have a length */ column->len = -1; |