From e8bd3b9b4f8a8e37423d45bb5230f5cd0f4c19aa Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Fri, 25 Mar 2005 00:30:43 +0000 Subject: [PATCH] Slightly safer code. --- ext/pgsql/pgsql.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index eaaa95ca81..f90f8fa66c 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 */ -- 2.50.1