summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJani Taskinen <jani@php.net>2009-08-03 13:02:53 +0000
committerJani Taskinen <jani@php.net>2009-08-03 13:02:53 +0000
commit28e248da9bf6d9dd170b41e3cef94d2bc63f1d07 (patch)
treee58886669f530a9f9960350f69bc6e261b8c28ef
parent4bc219eadb78f5f34af77b2396160f43e7a99f15 (diff)
downloadphp-git-28e248da9bf6d9dd170b41e3cef94d2bc63f1d07.tar.gz
- Fixed bug #48400 (imap crashes when closing stream opened with OP_PROTOTYPE flag)
-rw-r--r--NEWS14
-rw-r--r--ext/imap/php_imap.c8
2 files changed, 15 insertions, 7 deletions
diff --git a/NEWS b/NEWS
index 9c591dd165..7409690049 100644
--- a/NEWS
+++ b/NEWS
@@ -4,8 +4,6 @@ PHP NEWS
- Fixed regression in cURL extension that prevented flush of data to output
defined as a file handle. (Ilia)
-- 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)
@@ -28,6 +26,8 @@ PHP NEWS
- Fixed bug #48801 (Problem with imagettfbbox). (Takeshi Abe)
- Fixed bug #48788 (RecursiveDirectoryIterator doesn't descend into symlinked
directories). (Ilia)
+- Fixed bug #48774 (SIGSEGVs when using curl_copy_handle()).
+ (Sriram Natarajan)
- Fixed bug #48763 (ZipArchive produces corrupt archive). (dani dot church at
gmail dot com, Pierre)
- Fixed bug #48762 (IPv6 address filter still rejects valid address). (Felipe)
@@ -57,25 +57,27 @@ PHP NEWS
- Fixed bug #48465 (sys_get_temp_dir() possibly inconsistent when using
TMPDIR). (Ilia)
- Fixed bug #48450 (Compile failure under IRIX 6.5.30 building gd.c). (Kalle)
+- Fixed bug #48400 (imap crashes when closing stream opened with
+ OP_PROTOTYPE flag). (Jani)
- Fixed bug #48276 (date("Y") on big endian machines produces the
wrong result). (Scott)
- Fixed bug #48247 (Infinite loop and possible crash during startup with
errors when errors are logged). (Jani)
- Fixed bug #48116 (Fixed build with Openssl 1.0). (Pierre,
Al dot Smith at aeschi dot ch dot eu dot org)
+- Fixed bug #48182 (ssl handshake fails during asynchronous socket connection).
+ (Sriram Natarajan)
- Fixed bug #48057 (Only the date fields of the first row are fetched,
others are empty). (info at programmiernutte dot net)
- Fixed bug #47481 (natcasesort() does not sort extended ASCII characters
correctly). (Herman Radtke)
- Fixed bug #47351 (Memory leak in DateTime). (Derick, Tobias John)
+- Fixed bug #46020 (with Sun Java System Web Server 7.0 on HPUX, #define HPUX).
+ (Uwe Schindler)
- Fixed bug #45905 (imagefilledrectangle() clipping error).
(markril at hotmail dot com, Pierre)
- Fixed bug #45280 (Reflection of instantiated COM classes causes PHP to crash)
(Paul Richards, Kalle)
-- 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 #45141 (setcookie will output expires years of >4 digits). (Ilia)
- Fixed bug #44144 (spl_autoload_functions() should return object instance
when appropriate). (Hannes, Etienne)
diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c
index a5b2dc9068..e44e7078e0 100644
--- a/ext/imap/php_imap.c
+++ b/ext/imap/php_imap.c
@@ -221,7 +221,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));
@@ -783,6 +786,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)) {