summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2006-02-16 16:03:27 +0000
committerIlia Alshanetsky <iliaa@php.net>2006-02-16 16:03:27 +0000
commitce9dfedc69ab6d45973d38758e253ff64ec87d69 (patch)
tree00c91b587bd11601fce136e77a1c03ff5edfab5c
parent2108714a2b78fa9ef5410c4933534867b940f19d (diff)
downloadphp-git-ce9dfedc69ab6d45973d38758e253ff64ec87d69.tar.gz
Fixed bug #36420 (segfault when access result->num_rows after calling
result->close())
-rw-r--r--NEWS2
-rw-r--r--ext/mysqli/mysqli.c5
2 files changed, 7 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 16fcce557d..4ebc17c50b 100644
--- a/NEWS
+++ b/NEWS
@@ -22,6 +22,8 @@ PHP NEWS
- Added ReflectionClass::newInstanceArgs($args). (Marcus)
- Added imap_savebody() that allows message body to be written to a file.
(Mike)
+- Fixed bug #36420 (segfault when access result->num_rows after calling
+ result->close()). (Ilia)
- Fixed bug #36403 (oci_execute() no longer supports OCI_DESCRIBE_ONLY).
(Tony)
- Fixed bug #36400 (Custom 5xx error does not return correct HTTP response
diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c
index 0d1b34db9e..47539b717c 100644
--- a/ext/mysqli/mysqli.c
+++ b/ext/mysqli/mysqli.c
@@ -198,6 +198,11 @@ zval *mysqli_read_property(zval *object, zval *member, int type TSRMLS_DC)
ret = FAILURE;
obj = (mysqli_object *)zend_objects_get_address(object TSRMLS_CC);
+ /* object was already destroyed */
+ if (!obj->ptr) {
+ retval = EG(uninitialized_zval_ptr);
+ return(retval);
+ }
if (member->type != IS_STRING) {
tmp_member = *member;