]> granicus.if.org Git - php/commitdiff
- Fixed bug #48400 (imap crashes when closing stream opened with OP_PROTOTYPE flag)
authorJani Taskinen <jani@php.net>
Mon, 3 Aug 2009 13:02:53 +0000 (13:02 +0000)
committerJani Taskinen <jani@php.net>
Mon, 3 Aug 2009 13:02:53 +0000 (13:02 +0000)
NEWS
ext/imap/php_imap.c

diff --git a/NEWS b/NEWS
index 44673a477fae739abe394b1f1b13445b010922ae..c712d904dd4c071abb3699b0deb4492415e8abcf 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -7,8 +7,6 @@ PHP                                                                        NEWS
   Stas)
 - Fixed signature generation/validation for zip archives in ext/phar. (Greg)
 
-- Fixed bug #46020 (with Sun Java System Web Server 7.0 on HPUX, #define HPUX).
-  (Uwe Schindler)
 - Fixed bug #49132 (posix_times returns false without error).
   (phpbugs at gunnu dot us)
 - Fixed bug #49125 (Error in dba_exists C code). (jdornan at stanford dot edu)
@@ -60,6 +58,8 @@ PHP                                                                        NEWS
 - Fixed bug #48788 (RecursiveDirectoryIterator doesn't descend into symlinked
   directories). (Ilia)
 - Fixed bug #48783 (make install will fail saying phar file exists). (Greg)
+- Fixed bug #48774 (SIGSEGVs when using curl_copy_handle()).
+  (Sriram Natarajan)
 - Fixed bug #48771 (rename() between volumes fails and reports no error on 
   Windows). (Pierre)
 - Fixed bug #48763 (ZipArchive produces corrupt archive). (dani dot church at 
@@ -78,11 +78,15 @@ PHP                                                                        NEWS
   html-entities). (Moriyoshi)
 - Fixed bug #48637 ("file" fopen wrapper is overwritten when using
   --with-curlwrappers). (Jani)
+- Fixed bug #48400 (imap crashes when closing stream opened with
+  OP_PROTOTYPE flag). (Jani)
 - Fixed bug #48377 (error message unclear on converting phar with existing file).
   (Greg)
 - Fixed bug #48247 (Infinite loop and possible crash during startup with
   errors when errors are logged). (Jani)
 - Fixed bug #48189 (ibase_execute error in return param). (Kalle)
+- Fixed bug #48182 (ssl handshake fails during asynchronous socket connection).
+  (Sriram Natarajan)
 - Fixed bug #48116 (Fixed build with Openssl 1.0). (Pierre, 
   Al dot Smith at aeschi dot ch dot eu dot org)
 - Fixed bug #48057 (Only the date fields of the first row are fetched,
@@ -95,17 +99,15 @@ PHP                                                                        NEWS
 - Fixed bug #45905 (imagefilledrectangle() clipping error).
   (markril at hotmail dot com, Pierre)
 - Fixed bug #45141 (setcookie will output expires years of >4 digits). (Ilia)
-- Fixed bug #38091 (Mail() does not use FQDN when sending SMTP helo). 
-  (Kalle, Rick Yorgason)
-- Fixed bug #48774 (SIGSEGVs when using curl_copy_handle()).
-  (Sriram Natarajan)
-- Fixed bug #48182 (ssl handshake fails during asynchronous socket connection).
-  (Sriram Natarajan)
+- Fixed bug #46020 (with Sun Java System Web Server 7.0 on HPUX, #define HPUX).
+  (Uwe Schindler)
 - Fixed bug #45554 (Inconsistent behavior of the u format char). (Derick)
 - Fixed bug #43510 (stream_get_meta_data() does not return same mode as used
   in fopen). (Jani)
 - Fixed bug #42434 (ImageLine w/ antialias = 1px shorter). (wojjie at gmail dot 
   com, Kalle)
+- Fixed bug #38091 (Mail() does not use FQDN when sending SMTP helo). 
+  (Kalle, Rick Yorgason)
 
 30 Jun 2009, PHP 5.3.0
 - Upgraded bundled PCRE to version 7.9. (Nuno)
index 9e75da9d6716baebc01d3a779504e5721ff0c013..d9564f62d915bffa0f26a342fd471d65bb47fbcf 100644 (file)
@@ -597,7 +597,10 @@ static void mail_close_it(zend_rsrc_list_entry *rsrc TSRMLS_DC)
 {
        pils *imap_le_struct = (pils *)rsrc->ptr;
 
-       mail_close_full(imap_le_struct->imap_stream, imap_le_struct->flags);
+       /* Do not try to close prototype streams */
+       if (!(imap_le_struct->flags & OP_PROTOTYPE)) {
+               mail_close_full(imap_le_struct->imap_stream, imap_le_struct->flags);
+       }
 
        if (IMAPG(imap_user)) {
                efree(IMAPG(imap_user));
@@ -1154,6 +1157,9 @@ static void php_imap_do_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
                        cl_flags = CL_EXPUNGE;
                        flags ^= PHP_EXPUNGE;
                }
+               if (flags & OP_PROTOTYPE) {
+                       cl_flags |= OP_PROTOTYPE;
+               }
        }
 
        if (IMAPG(imap_user)) {