Skip to content

Commit

Permalink
- Fixed bug #48400 (imap crashes when closing stream opened with OP_P…
Browse files Browse the repository at this point in the history
…ROTOTYPE flag)
  • Loading branch information
Jani Taskinen committed Aug 3, 2009
1 parent 4bc219e commit 28e248d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
14 changes: 8 additions & 6 deletions NEWS
Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
8 changes: 7 additions & 1 deletion ext/imap/php_imap.c
Expand Up @@ -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));
Expand Down Expand Up @@ -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)) {
Expand Down

0 comments on commit 28e248d

Please sign in to comment.