]> granicus.if.org Git - php/commitdiff
Fixed bug #69897 (segfault when manually constructing SQLite3Result)
authorKalle Sommer Nielsen <kalle@php.net>
Mon, 22 Jun 2015 09:12:23 +0000 (11:12 +0200)
committerKalle Sommer Nielsen <kalle@php.net>
Mon, 22 Jun 2015 09:12:23 +0000 (11:12 +0200)
NEWS
ext/sqlite3/sqlite3.c

diff --git a/NEWS b/NEWS
index da7583664ad32bc2caabd62f5f34032004ece710..7e60435848231c880c3e938dd2a561950c59d8da 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-PHP                                                                        NEWS
+PHP                                                                        NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 25 Jun 2015, PHP 7.0.0 Alpha 2
 
@@ -57,6 +57,10 @@ PHP                                                                        NEWS
 - SPL
   . Fixed bug #69845 (ArrayObject with ARRAY_AS_PROPS broken). (Dmitry)
 
+- SQLite3
+  . Fixed bug #69897 (segfault when manually constructing SQLite3Result). 
+    (Kalle)
+
 - Standard
   . Fixed bug #62922 (Truncating entire string should result in string).
     (Nikita)
index f9bcb311f562f1148944c00935d8852cc8457a09..00560450fe0b95b21de178e6650d5c570f117952 100644 (file)
@@ -2103,7 +2103,7 @@ static void php_sqlite3_result_object_free_storage(zend_object *object) /* {{{ *
        }
 
        if (!Z_ISNULL(intern->stmt_obj_zval)) {
-               if (intern->stmt_obj->initialised) {
+               if (intern->stmt_obj && intern->stmt_obj->initialised) {
                        sqlite3_reset(intern->stmt_obj->stmt);
                }