cvs: php-src /ext/pgsql pgsql.c
| From: | Ilia Alshanetsky | Date: | Fri, 25 Mar 2005 00:30:44 +0000 |
| Subject: | cvs: php-src /ext/pgsql pgsql.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-31109@lists.php.net to get a copy of this message | ||
iliaa Thu Mar 24 19:30:44 2005 EDT
Modified files:
/php-src/ext/pgsql pgsql.c
Log:
Slightly safer code.
http://cvs.php.net/diff.php/php-src/ext/pgsql/pgsql.c?r1=1.320&r2=1.321&ty=u
Index: php-src/ext/pgsql/pgsql.c
diff -u php-src/ext/pgsql/pgsql.c:1.320 php-src/ext/pgsql/pgsql.c:1.321
--- php-src/ext/pgsql/pgsql.c:1.320 Tue Mar 22 03:51:21 2005
+++ php-src/ext/pgsql/pgsql.c Thu Mar 24 19:30:43 2005
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pgsql.c,v 1.320 2005/03/22 08:51:21 chriskl Exp $ */
+/* $Id: pgsql.c,v 1.321 2005/03/25 00:30:43 iliaa Exp $ */
#include <stdlib.h>
@@ -5164,7 +5164,7 @@
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 */