]> granicus.if.org Git - php/commitdiff
MFH: fix #38759 (PDO sqlite2 empty query causes segfault)
authorAntony Dovgal <tony2001@php.net>
Sat, 9 Sep 2006 10:59:05 +0000 (10:59 +0000)
committerAntony Dovgal <tony2001@php.net>
Sat, 9 Sep 2006 10:59:05 +0000 (10:59 +0000)
NEWS
ext/sqlite/libsqlite/src/vdbe.c

diff --git a/NEWS b/NEWS
index 4f2f1bb678c8b29ef761641c578c83fe528b6378..b2156e33a7b6f99c3e6c5d19eab41513f9499ad7 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@
   (marci at balabit dot hu, Tony)
 - Removed current working directory from the php.ini search path for CLI and
   readded it for other SAPIs (restore to pre 5.1.x behaviour). (Edin)
+- Fixed bug #38759 (PDO sqlite2 empty query causes segfault). (Tony)
 - Fixed bug #38700 (SoapClient::__getTypes never returns). (Dmitry)
 - Fixed bug #38693 (curl_multi_add_handle() set curl handle to null). (Ilia)
 - Fixed bug #38661 (mixed-case URL breaks url-wrappers). (Ilia)
index 7ea05c9acd2d28ab9cdbf08e26e28ee6c0d47b0f..cdbea0ed6bceb3097c882b565232ccbb0cd83ec2 100644 (file)
@@ -114,7 +114,7 @@ int sqlite_step(
   sqlite *db;
   int rc;
 
-  if( p->magic!=VDBE_MAGIC_RUN ){
+  if( !p || p->magic!=VDBE_MAGIC_RUN ){
     return SQLITE_MISUSE;
   }
   db = p->db;