diff options
| author | Ilia Alshanetsky <iliaa@php.net> | 2006-12-28 15:21:21 +0000 |
|---|---|---|
| committer | Ilia Alshanetsky <iliaa@php.net> | 2006-12-28 15:21:21 +0000 |
| commit | 794845234ee364a6ad7fcbdb953a9175d4ad25e9 (patch) | |
| tree | 0bba2b03e14ba5daaa86d4255f6ef3f9246749db /ext/pgsql | |
| parent | b154f188d10625ea3bfde0d15f565788a7409b11 (diff) | |
| download | php-git-794845234ee364a6ad7fcbdb953a9175d4ad25e9.tar.gz | |
Added buffer length checks
Diffstat (limited to 'ext/pgsql')
| -rw-r--r-- | ext/pgsql/pgsql.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 08a9948562..b1187b9c2a 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -5485,7 +5485,7 @@ static inline int build_assignment_string(smart_str *querystr, HashTable *ht, co smart_str_append_long(querystr, Z_LVAL_PP(val)); break; case IS_DOUBLE: - smart_str_appendl(querystr, buf, sprintf(buf, "%f", Z_DVAL_PP(val))); + smart_str_appendl(querystr, buf, MIN(snprintf(buf, sizeof(buf), "%f", Z_DVAL_PP(val)), sizeof(buf)-1)); break; default: /* should not happen */ |
