summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2005-03-25 00:30:43 (GMT)
committerIlia Alshanetsky <iliaa@php.net>2005-03-25 00:30:43 (GMT)
commite8bd3b9b4f8a8e37423d45bb5230f5cd0f4c19aa (patch)
treeaa770cc248465d664ff768b62c5046009d372ae3 /ext
parent3f16ad98c9626a022c0ce25ec0bf91961f324966 (diff)
downloadphp-e8bd3b9b4f8a8e37423d45bb5230f5cd0f4c19aa.tar.gz
Slightly safer code.
Diffstat (limited to 'ext')
-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 eaaa95c..f90f8fa 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -5164,7 +5164,7 @@ PHP_PGSQL_API int php_pgsql_insert(PGconn *pg_link, const char *table, zval *var
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, snprintf(buf, sizeof(buf), "%f", Z_DVAL_PP(val)));
break;
default:
/* should not happen */