summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2006-12-28 15:21:32 +0000
committerIlia Alshanetsky <iliaa@php.net>2006-12-28 15:21:32 +0000
commitc42fb0033dad7ecfa7513a90d46ac65f331d711c (patch)
treea610d2a60a4557bab382303819a5479acdd0b8ef
parent69c6843c9a8b5d4908c53cfc36d100b54082c4ee (diff)
downloadphp-git-c42fb0033dad7ecfa7513a90d46ac65f331d711c.tar.gz
MFB: Added buffer length checks
-rw-r--r--ext/pgsql/pgsql.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index 31ec83cebb..7c69108ce5 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -5472,7 +5472,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 */