From:             avi at phpclub dot org
Operating system: linux
PHP version:      5.2.11
PHP Bug Type:     IMAP related
Bug description:  imap_header crashing on large data

Description:
------------
imap_header crashes, I've searched the bugs db and found that many people
came across this problem but it hasn't been fixed properly nor has anyone
given too much data to solve it.

php version is 5.2.2 and according to the bugs it seems that upgarding
wouldn't do any good (plus, i'm on a shared host and can't upgrade on my
own).

Reproduce code:
---------------
a message with large header data (229 To addresses) and all kinds of junk
headers, the message is a chain message thats been throught tons of mail
servers & thus have many headers.

Actual result:
--------------
here's the gdb output :

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1211549472 (LWP 17124)]
0x439c88ec in memcpy () from /lib/tls/libc.so.6
(gdb) where
#0  0x439c88ec in memcpy () from /lib/tls/libc.so.6
#1  0x08362d75 in rfc822_output_data (buf=0x8896eb7,
    string=0x8892a98 "d.co.il", len=-1080115201) at rfc822.c:1361
#2  0x08362dd8 in rfc822_output_string (buf=0xbf9e77b0, string=Variable
"string"                                                                   
          is not available.
)
    at rfc822.c:1380
#3  0x0836305f in rfc822_output_address (buf=0xbf9e77b0, adr=0x8892a60)
    at rfc822.c:1577
#4  0x083630b9 in rfc822_output_address_list (buf=0xbf9e77b0,
adr=0x8892a60,
    pretty=0, specials=0x0) at rfc822.c:1541
#5  0x0814e52d in _php_rfc822_write_address (addresslist=Variable
"addresslist"                                                              
               is not available.
)
    at /home/cpeasyapache/src/php-5.2.8/ext/imap/php_imap.c:3904
#6  0x00000029 in ?? ()
(gdb) list
3904    /home/cpeasyapache/src/php-5.2.8/ext/imap/php_imap.c: No such file
or directory.
        in /home/cpeasyapache/src/php-5.2.8/ext/imap/php_imap.c



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

Reply via email to