jani Mon, 03 Aug 2009 13:02:53 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=286732
Log: - Fixed bug #48400 (imap crashes when closing stream opened with OP_PROTOTYPE flag) Bug: http://bugs.php.net/48400 (Assigned) imap crashes when closing stream opened with OP_PROTOTYPE option Changed paths: U php/php-src/branches/PHP_5_2/NEWS U php/php-src/branches/PHP_5_2/ext/imap/php_imap.c U php/php-src/branches/PHP_5_3/NEWS U php/php-src/branches/PHP_5_3/ext/imap/php_imap.c U php/php-src/trunk/ext/imap/php_imap.c
Modified: php/php-src/branches/PHP_5_2/NEWS =================================================================== --- php/php-src/branches/PHP_5_2/NEWS 2009-08-03 12:59:05 UTC (rev 286731) +++ php/php-src/branches/PHP_5_2/NEWS 2009-08-03 13:02:53 UTC (rev 286732) @@ -4,8 +4,6 @@ - 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 @@ - 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 @@ - 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) Modified: php/php-src/branches/PHP_5_2/ext/imap/php_imap.c =================================================================== --- php/php-src/branches/PHP_5_2/ext/imap/php_imap.c 2009-08-03 12:59:05 UTC (rev 286731) +++ php/php-src/branches/PHP_5_2/ext/imap/php_imap.c 2009-08-03 13:02:53 UTC (rev 286732) @@ -221,7 +221,10 @@ { 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 @@ cl_flags = CL_EXPUNGE; flags ^= PHP_EXPUNGE; } + if (flags & OP_PROTOTYPE) { + cl_flags |= OP_PROTOTYPE; + } } if (IMAPG(imap_user)) { Modified: php/php-src/branches/PHP_5_3/NEWS =================================================================== --- php/php-src/branches/PHP_5_3/NEWS 2009-08-03 12:59:05 UTC (rev 286731) +++ php/php-src/branches/PHP_5_3/NEWS 2009-08-03 13:02:53 UTC (rev 286732) @@ -7,8 +7,6 @@ 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 @@ - 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 @@ 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 @@ - 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) Modified: php/php-src/branches/PHP_5_3/ext/imap/php_imap.c =================================================================== --- php/php-src/branches/PHP_5_3/ext/imap/php_imap.c 2009-08-03 12:59:05 UTC (rev 286731) +++ php/php-src/branches/PHP_5_3/ext/imap/php_imap.c 2009-08-03 13:02:53 UTC (rev 286732) @@ -597,7 +597,10 @@ { 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 @@ cl_flags = CL_EXPUNGE; flags ^= PHP_EXPUNGE; } + if (flags & OP_PROTOTYPE) { + cl_flags |= OP_PROTOTYPE; + } } if (IMAPG(imap_user)) { Modified: php/php-src/trunk/ext/imap/php_imap.c =================================================================== --- php/php-src/trunk/ext/imap/php_imap.c 2009-08-03 12:59:05 UTC (rev 286731) +++ php/php-src/trunk/ext/imap/php_imap.c 2009-08-03 13:02:53 UTC (rev 286732) @@ -597,7 +597,10 @@ { 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 @@ cl_flags = CL_EXPUNGE; flags ^= PHP_EXPUNGE; } + if (flags & OP_PROTOTYPE) { + cl_flags |= OP_PROTOTYPE; + } } if (IMAPG(imap_user)) {
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php