From 248d8c804f87e0405ec66454fe7e0e30db14bb8d Mon Sep 17 00:00:00 2001 From: tilghman Date: Mon, 10 Aug 2009 19:12:35 +0000 Subject: AST-2009-005 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@211526 f38db490-d61c-443f-a65b-d21fe96a405b --- funcs/func_math.c | 4 ++-- funcs/func_strings.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'funcs') diff --git a/funcs/func_math.c b/funcs/func_math.c index 4795efcc6..e456d1af6 100644 --- a/funcs/func_math.c +++ b/funcs/func_math.c @@ -159,12 +159,12 @@ static char *builtin_function_math(struct ast_channel *chan, char *cmd, char *da return NULL; } - if (sscanf(mvalue1, "%lf", &fnum1) != 1) { + if (sscanf(mvalue1, "%30lf", &fnum1) != 1) { ast_log(LOG_WARNING, "'%s' is not a valid number\n", mvalue1); return NULL; } - if (sscanf(mvalue2, "%lf", &fnum2) != 1) { + if (sscanf(mvalue2, "%30lf", &fnum2) != 1) { ast_log(LOG_WARNING, "'%s' is not a valid number\n", mvalue2); return NULL; } diff --git a/funcs/func_strings.c b/funcs/func_strings.c index 0aaf3fc4b..9ce8b08d2 100644 --- a/funcs/func_strings.c +++ b/funcs/func_strings.c @@ -169,7 +169,7 @@ static char *acf_strftime(struct ast_channel *chan, char *cmd, char *data, char epoch = strsep(&format, "|"); timezone = strsep(&format, "|"); - if (ast_strlen_zero(epoch) || !sscanf(epoch, "%ld", &epochi)) { + if (ast_strlen_zero(epoch) || !sscanf(epoch, "%30ld", &epochi)) { struct timeval tv = ast_tvnow(); epochi = tv.tv_sec; } -- cgit v1.2.3