aboutsummaryrefslogtreecommitdiffstats
path: root/funcs
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 /funcs
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 'funcs')
-rw-r--r--funcs/func_math.c4
-rw-r--r--funcs/func_strings.c2
2 files changed, 3 insertions, 3 deletions
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;
}