diff options
author | Antony Dovgal <tony2001@php.net> | 2005-12-01 13:46:05 +0000 |
---|---|---|
committer | Antony Dovgal <tony2001@php.net> | 2005-12-01 13:46:05 +0000 |
commit | 4f906aa23fe2cf13f75717f4ae1ad0ec4e09988c (patch) | |
tree | f750a0a2e2390f17e26a2bbaa7e7fefccd825c41 /ext/oci8/oci8_statement.c | |
parent | a139e19fe39812ac8b230a765a070dd67bf4d1eb (diff) | |
download | php-git-4f906aa23fe2cf13f75717f4ae1ad0ec4e09988c.tar.gz |
fix potential problem in php_oci_bind_post_exec() when OCIDateToText() fails
Diffstat (limited to 'ext/oci8/oci8_statement.c')
-rw-r--r-- | ext/oci8/oci8_statement.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/oci8/oci8_statement.c b/ext/oci8/oci8_statement.c index 3927392e30..a56f7a6961 100644 --- a/ext/oci8/oci8_statement.c +++ b/ext/oci8/oci8_statement.c @@ -697,7 +697,9 @@ int php_oci_bind_post_exec(void *data TSRMLS_DC) php_oci_error(connection->err, connection->errcode TSRMLS_CC); ZVAL_NULL(*entry); } - ZVAL_STRINGL(*entry, buff, buff_len, 1); + else { + ZVAL_STRINGL(*entry, buff, buff_len, 1); + } zend_hash_move_forward(hash); } else { @@ -706,7 +708,9 @@ int php_oci_bind_post_exec(void *data TSRMLS_DC) php_oci_error(connection->err, connection->errcode TSRMLS_CC); add_next_index_null(bind->zval); } - add_next_index_stringl(bind->zval, buff, buff_len, 1); + else { + add_next_index_stringl(bind->zval, buff, buff_len, 1); + } } } break; |