|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49704 imap_header crashing on large data
Submitted: 2009-09-29 02:24 UTC Modified: 2009-10-08 01:00 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: avi at phpclub dot org Assigned: pajoye (profile)
Status: No Feedback Package: IMAP related
PHP Version: 5.2.11 OS: linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2009-09-29 02:24 UTC] avi at phpclub dot org
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/
(gdb) where
#0  0x439c88ec in memcpy () from /lib/tls/
#1  0x08362d75 in rfc822_output_data (buf=0x8896eb7,
    string=0x8892a98 "", 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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-09-29 08:10 UTC]
Which c-client version do you use?
 [2009-09-29 15:55 UTC] avi at phpclub dot org
Don't know, how can I check?
 [2009-09-29 15:59 UTC]
Check what you have installed or phpinfo. It should be something like 200x and a letter.
 [2009-09-30 08:38 UTC] avi at phpclub dot org
c-client ver : 2006k
PHP version 5.2.8
 [2009-09-30 08:42 UTC]
Please try using a recent version (2007+).
 [2009-10-08 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Jan 23 14:01:23 2021 UTC