helly Mon Apr 10 19:51:55 2006 UTC
Modified files: (Branch: PHP_5_1)
/php-src/ext/pgsql pgsql.c
Log:
- MFH Fix potenbtioal SEGV
http://cvs.php.net/viewcvs.cgi/php-src/ext/pgsql/pgsql.c?r1=1.331.2.12&r2=1.331.2.13&diff_format=u
Index: php-src/ext/pgsql/pgsql.c
diff -u php-src/ext/pgsql/pgsql.c:1.331.2.12
php-src/ext/pgsql/pgsql.c:1.331.2.13
--- php-src/ext/pgsql/pgsql.c:1.331.2.12 Tue Mar 28 00:28:02 2006
+++ php-src/ext/pgsql/pgsql.c Mon Apr 10 19:51:55 2006
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pgsql.c,v 1.331.2.12 2006/03/28 00:28:02 yohgaki Exp $ */
+/* $Id: pgsql.c,v 1.331.2.13 2006/04/10 19:51:55 helly Exp $ */
#include <stdlib.h>
@@ -4531,6 +4531,7 @@
zend_hash_get_current_data_ex(Z_ARRVAL_P(values), (void
**)&val, &pos) == SUCCESS;
zend_hash_move_forward_ex(Z_ARRVAL_P(values), &pos)) {
skip_field = 0;
+ new_val = NULL;
if ((key_type =
zend_hash_get_current_key_ex(Z_ARRVAL_P(values), &field, &field_len, &num_idx,
0, &pos)) == HASH_KEY_NON_EXISTANT) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to
get array key type");
@@ -4569,7 +4570,7 @@
if (err) {
break; /* break out for() */
}
- MAKE_STD_ZVAL(new_val);
+ ALLOC_INIT_ZVAL(new_val);
switch(php_pgsql_get_data_type(Z_STRVAL_PP(type),
Z_STRLEN_PP(type)))
{
case PG_BOOL:
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php