diff options
author | Marcus Boerger <helly@php.net> | 2006-04-10 19:51:55 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2006-04-10 19:51:55 +0000 |
commit | 8bbf3a00dcf1e73211fbb7ec72dc75d4fd27f7c2 (patch) | |
tree | 2e4096a4910f7ed660f5f746053956487a87dccf | |
parent | 3438469b84ed49695c73da8a0f6751d9b2124870 (diff) | |
download | php-git-8bbf3a00dcf1e73211fbb7ec72dc75d4fd27f7c2.tar.gz |
- MFH Fix potenbtioal SEGV
-rw-r--r-- | ext/pgsql/pgsql.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 60cd217757..8f640d46e2 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -4531,6 +4531,7 @@ PHP_PGSQL_API int php_pgsql_convert(PGconn *pg_link, const char *table_name, con 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 @@ PHP_PGSQL_API int php_pgsql_convert(PGconn *pg_link, const char *table_name, con 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: |