From:             
Operating system: linux
PHP version:      5.2.13
Package:          *Mail Related
Bug Type:         Bug
Bug description:iconv_mime_encode() eats all memory

Description:
------------
We got this error:



PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to
allocate 2194780439 bytes) in



After examining the reason, I found this test to reproduce it.



Because we don't have 5.2.13 in production, this is only tested with
5.2.12, but as far as I know, there was no change here, since that, so it
should also be reproduce able with 5.2.13.





Test script:
---------------
<?php





$string = 'Короткое замыкание в цепи датчика
емкостного водонагревателя';



error_log(phpversion());

error_log ("1");

error_log (iconv_mime_encode( 'Subject', $string, array(

    'scheme' => 'Q',

    'input-charset' => 'utf-8',

    'output-charset' => 'utf-8',

    'line-length'    => 74,

    'linke-break-chars' => "\r\n")

));



error_log("2");

Actual result:
--------------
The script prints out only "1" and breaks down with the fatal error. Take
care! It eats all memory if no limits are here!



-- 
Edit bug report at http://bugs.php.net/bug.php?id=51967&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=51967&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=51967&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=51967&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=51967&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=51967&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=51967&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=51967&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=51967&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=51967&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=51967&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=51967&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=51967&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=51967&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=51967&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=51967&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=51967&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=51967&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=51967&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=51967&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=51967&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=51967&r=mysqlcfg

Reply via email to