From f496bf9dda73969ee9ef8d113e9a5e6d02bd02f4 Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Thu, 1 Dec 2005 13:47:22 +0000 Subject: [PATCH] MFH: fix potential problem in php_oci_bind_post_exec() when OCIDateToText() fails --- ext/oci8/oci8_statement.c | 8 ++++++-- 1 file 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; -- 2.50.1