summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorThies C. Arntzen <thies@php.net>2001-07-08 12:37:08 +0000
committerThies C. Arntzen <thies@php.net>2001-07-08 12:37:08 +0000
commit423613f4eef34687a88d67c50794a23fb0578b65 (patch)
treed1921de5ef413aad140cadc0cb9b788ce8ff3a9d /ext
parentcd9fe169e140f5f2d4d895aff6224958956b8e08 (diff)
downloadphp-git-423613f4eef34687a88d67c50794a23fb0578b65.tar.gz
@ - Make sure that OCI8 outbound variables are always zero-terminated. (Thies)
Diffstat (limited to 'ext')
-rw-r--r--ext/oci8/oci8.c6
-rw-r--r--ext/oci8/php_oci8.h2
2 files changed, 7 insertions, 1 deletions
diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c
index 6a43f3d7e3..ccacdb0646 100644
--- a/ext/oci8/oci8.c
+++ b/ext/oci8/oci8.c
@@ -563,7 +563,7 @@ PHP_RSHUTDOWN_FUNCTION(oci)
{
oci_debug("START php_rshutdown_oci");
-#if 0
+#if 0
/* XXX free all statements, rollback all outstanding transactions */
zend_hash_apply(OCI(user),(int (*)(void *))_session_cleanup);
@@ -649,8 +649,12 @@ _oci_bind_post_exec(void *data)
zval *val = bind->zval;
zval_dtor(val);
ZVAL_NULL(val);
+ } else if (bind->zval->type == IS_STRING) {
+ bind->zval->value.str.val = realloc(bind->zval->value.str.val, bind->zval->value.str.len+1);
+ bind->zval->value.str.val[ bind->zval->value.str.len ] = '\0';
}
+
return 0;
}
diff --git a/ext/oci8/php_oci8.h b/ext/oci8/php_oci8.h
index a9f59db556..db474c3fab 100644
--- a/ext/oci8/php_oci8.h
+++ b/ext/oci8/php_oci8.h
@@ -181,6 +181,8 @@ typedef struct {
HashTable *user;
OCIEnv *pEnv;
+
+ int in_call;
} php_oci_globals;
extern zend_module_entry oci8_module_entry;