iliaa Thu Dec 28 15:21:32 2006 UTC Modified files: /php-src/ext/pgsql pgsql.c Log: MFB: Added buffer length checks http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/pgsql.c?r1=1.361&r2=1.362&diff_format=u Index: php-src/ext/pgsql/pgsql.c diff -u php-src/ext/pgsql/pgsql.c:1.361 php-src/ext/pgsql/pgsql.c:1.362 --- php-src/ext/pgsql/pgsql.c:1.361 Tue Dec 26 17:40:20 2006 +++ php-src/ext/pgsql/pgsql.c Thu Dec 28 15:21:32 2006 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pgsql.c,v 1.361 2006/12/26 17:40:20 iliaa Exp $ */ +/* $Id: pgsql.c,v 1.362 2006/12/28 15:21:32 iliaa Exp $ */ #include <stdlib.h> @@ -5472,7 +5472,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, MIN(snprintf(buf, sizeof(buf), "%f", Z_DVAL_PP(val)), sizeof(buf)-1)); break; default: /* should not happen */
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php