Browse Source

Fixed bug #64726 (Segfault when calling fetch_object on a use_result and DB pointer has closed)

pull/315/merge
Xinchen Hui 13 years ago
parent
commit
8f5a534b21
  1. 4
      NEWS
  2. 2
      ext/mysqli/mysqli.c
  3. 2
      ext/mysqli/tests/bug64726.phpt

4
NEWS

@ -17,6 +17,10 @@ PHP NEWS
- Fileinfo:
. Upgraded libmagic to 5.14. (Anatol)
- MySQLi:
. Fixed bug #64726 (Segfault when calling fetch_object on a use_result and DB
pointer has closed). (Laruence)
- Zip:
. Fixed bug #64342 (ZipArchive::addFile() has to check for file existence).
(Anatol)

2
ext/mysqli/mysqli.c

@ -1257,7 +1257,7 @@ void php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARAMETERS, int override_flags
php_mysqli_fetch_into_hash_aux(return_value, result, fetchtype TSRMLS_CC);
if (into_object && Z_TYPE_P(return_value) != IS_NULL) {
if (into_object && Z_TYPE_P(return_value) == IS_ARRAY) {
zval dataset = *return_value;
zend_fcall_info fci;
zend_fcall_info_cache fcc;

2
ext/mysqli/tests/bug64726.phpt

@ -1,5 +1,5 @@
--TEST--
Bug #63398 (Memleak when calling fetch_object on a use_result and DB pointer has closed)
Bug #63398 (Segfault when calling fetch_object on a use_result and DB pointer has closed)
--SKIPIF--
<?php
require_once('skipif.inc');

Loading…
Cancel
Save