Skip to content

Commit 952a193

Browse files
author
Jani Taskinen
committed
- Fixed bug #48400 (imap crashes when closing stream opened with OP_PROTOTYPE flag)
1 parent e3d23b9 commit 952a193

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

NEWS

+10-8
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ PHP NEWS
77
Stas)
88
- Fixed signature generation/validation for zip archives in ext/phar. (Greg)
99

10-
- Fixed bug #46020 (with Sun Java System Web Server 7.0 on HPUX, #define HPUX).
11-
(Uwe Schindler)
1210
- Fixed bug #49132 (posix_times returns false without error).
1311
(phpbugs at gunnu dot us)
1412
- Fixed bug #49125 (Error in dba_exists C code). (jdornan at stanford dot edu)
@@ -60,6 +58,8 @@ PHP NEWS
6058
- Fixed bug #48788 (RecursiveDirectoryIterator doesn't descend into symlinked
6159
directories). (Ilia)
6260
- Fixed bug #48783 (make install will fail saying phar file exists). (Greg)
61+
- Fixed bug #48774 (SIGSEGVs when using curl_copy_handle()).
62+
(Sriram Natarajan)
6363
- Fixed bug #48771 (rename() between volumes fails and reports no error on
6464
Windows). (Pierre)
6565
- Fixed bug #48763 (ZipArchive produces corrupt archive). (dani dot church at
@@ -78,11 +78,15 @@ PHP NEWS
7878
html-entities). (Moriyoshi)
7979
- Fixed bug #48637 ("file" fopen wrapper is overwritten when using
8080
--with-curlwrappers). (Jani)
81+
- Fixed bug #48400 (imap crashes when closing stream opened with
82+
OP_PROTOTYPE flag). (Jani)
8183
- Fixed bug #48377 (error message unclear on converting phar with existing file).
8284
(Greg)
8385
- Fixed bug #48247 (Infinite loop and possible crash during startup with
8486
errors when errors are logged). (Jani)
8587
- Fixed bug #48189 (ibase_execute error in return param). (Kalle)
88+
- Fixed bug #48182 (ssl handshake fails during asynchronous socket connection).
89+
(Sriram Natarajan)
8690
- Fixed bug #48116 (Fixed build with Openssl 1.0). (Pierre,
8791
Al dot Smith at aeschi dot ch dot eu dot org)
8892
- Fixed bug #48057 (Only the date fields of the first row are fetched,
@@ -95,17 +99,15 @@ PHP NEWS
9599
- Fixed bug #45905 (imagefilledrectangle() clipping error).
96100
(markril at hotmail dot com, Pierre)
97101
- Fixed bug #45141 (setcookie will output expires years of >4 digits). (Ilia)
98-
- Fixed bug #38091 (Mail() does not use FQDN when sending SMTP helo).
99-
(Kalle, Rick Yorgason)
100-
- Fixed bug #48774 (SIGSEGVs when using curl_copy_handle()).
101-
(Sriram Natarajan)
102-
- Fixed bug #48182 (ssl handshake fails during asynchronous socket connection).
103-
(Sriram Natarajan)
102+
- Fixed bug #46020 (with Sun Java System Web Server 7.0 on HPUX, #define HPUX).
103+
(Uwe Schindler)
104104
- Fixed bug #45554 (Inconsistent behavior of the u format char). (Derick)
105105
- Fixed bug #43510 (stream_get_meta_data() does not return same mode as used
106106
in fopen). (Jani)
107107
- Fixed bug #42434 (ImageLine w/ antialias = 1px shorter). (wojjie at gmail dot
108108
com, Kalle)
109+
- Fixed bug #38091 (Mail() does not use FQDN when sending SMTP helo).
110+
(Kalle, Rick Yorgason)
109111

110112
30 Jun 2009, PHP 5.3.0
111113
- Upgraded bundled PCRE to version 7.9. (Nuno)

ext/imap/php_imap.c

+7-1
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,10 @@ static void mail_close_it(zend_rsrc_list_entry *rsrc TSRMLS_DC)
597597
{
598598
pils *imap_le_struct = (pils *)rsrc->ptr;
599599

600-
mail_close_full(imap_le_struct->imap_stream, imap_le_struct->flags);
600+
/* Do not try to close prototype streams */
601+
if (!(imap_le_struct->flags & OP_PROTOTYPE)) {
602+
mail_close_full(imap_le_struct->imap_stream, imap_le_struct->flags);
603+
}
601604

602605
if (IMAPG(imap_user)) {
603606
efree(IMAPG(imap_user));
@@ -1154,6 +1157,9 @@ static void php_imap_do_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
11541157
cl_flags = CL_EXPUNGE;
11551158
flags ^= PHP_EXPUNGE;
11561159
}
1160+
if (flags & OP_PROTOTYPE) {
1161+
cl_flags |= OP_PROTOTYPE;
1162+
}
11571163
}
11581164

11591165
if (IMAPG(imap_user)) {

0 commit comments

Comments
 (0)