aboutsummaryrefslogtreecommitdiffstats
path: root/funcs
diff options
context:
space:
mode:
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;
}