mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 07:35:18 +00:00
AST-2009-005
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user