diff options
Diffstat (limited to 'cel/cel_pgsql.c')
-rw-r--r-- | cel/cel_pgsql.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cel/cel_pgsql.c b/cel/cel_pgsql.c index 8b10261ee..8ca410449 100644 --- a/cel/cel_pgsql.c +++ b/cel/cel_pgsql.c @@ -244,7 +244,7 @@ static void pgsql_log(const struct ast_event *event, void *userdata) } if (strncmp(cur->type, "int", 3) == 0) { long long whatever; - if (value && sscanf(value, "%lld", &whatever) == 1) { + if (value && sscanf(value, "%30lld", &whatever) == 1) { LENGTHEN_BUF2(26); ast_str_append(&sql2, 0, "%s%lld", SEP, whatever); } else { @@ -253,7 +253,7 @@ static void pgsql_log(const struct ast_event *event, void *userdata) } } else if (strncmp(cur->type, "float", 5) == 0) { long double whatever; - if (value && sscanf(value, "%Lf", &whatever) == 1) { + if (value && sscanf(value, "%30Lf", &whatever) == 1) { LENGTHEN_BUF2(51); ast_str_append(&sql2, 0, "%s%30Lf", SEP, whatever); } else { @@ -493,7 +493,7 @@ static int process_my_load_module(struct ast_config *cfg) ast_verb(4, "Found column '%s' of type '%s'\n", fname, ftype); cur = ast_calloc(1, sizeof(*cur) + strlen(fname) + strlen(ftype) + 2); if (cur) { - sscanf(flen, "%d", &cur->len); + sscanf(flen, "%30d", &cur->len); cur->name = (char *)cur + sizeof(*cur); cur->type = (char *)cur + sizeof(*cur) + strlen(fname) + 1; strcpy(cur->name, fname); |