AST-2009-005

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@211528 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2009-08-10 19:15:57 +00:00
parent 541976843e
commit 63cc189747
69 changed files with 339 additions and 316 deletions

View File

@@ -289,7 +289,7 @@ static int acf_sprintf(struct ast_channel *chan, char *cmd, char *data, char *bu
/* Convert the argument into the required type */
if (arg.var[argcount]) {
if (sscanf(arg.var[argcount++], "%d", &tmpi) != 1) {
if (sscanf(arg.var[argcount++], "%30d", &tmpi) != 1) {
ast_log(LOG_ERROR, "Argument '%s' is not an integer number for format '%s'\n", arg.var[argcount - 1], formatbuf);
goto sprintf_fail;
}
@@ -312,7 +312,7 @@ static int acf_sprintf(struct ast_channel *chan, char *cmd, char *data, char *bu
/* Convert the argument into the required type */
if (arg.var[argcount]) {
if (sscanf(arg.var[argcount++], "%lf", &tmpd) != 1) {
if (sscanf(arg.var[argcount++], "%30lf", &tmpd) != 1) {
ast_log(LOG_ERROR, "Argument '%s' is not a floating point number for format '%s'\n", arg.var[argcount - 1], formatbuf);
goto sprintf_fail;
}