|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35657 imap_mail_compose and message/rfc822
Submitted: 2005-12-13 11:07 UTC Modified: 2005-12-21 01:00 UTC
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: laurent dot bouleau at univ-reims dot fr Assigned:
Status: No Feedback Package: IMAP related
PHP Version: 4CVS-2005-12-13 (snap) OS: Fedora Core 4
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: laurent dot bouleau at univ-reims dot fr
New email:
PHP Version: OS:


 [2005-12-13 11:07 UTC] laurent dot bouleau at univ-reims dot fr
imap_mail_compose crash (Segmentation Fault) if a part of a message is of type message/rfc822 (forward).


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-12-13 13:07 UTC] laurent dot bouleau at univ-reims dot fr
In a function like :

// The result of imap_mail_compose() is an
// exit signal Segmentation fault: (11)
// in apache error_log
 [2005-12-13 13:10 UTC]
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read for *NIX and for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
 [2005-12-13 13:14 UTC]
And please provide the real reproduce script.
The one you've posted doesn't contain any data.
 [2005-12-13 13:45 UTC] laurent dot bouleau at univ-reims dot fr
Here is the backtrace :

#0  mail_free_stringlist (string=0x14) at mail.c:5792
#1  0x00cd603a in mail_free_body_data (body=0x934b1b0) at mail.c:5651
#2  0x00cd6063 in mail_free_body_part (part=0x9075628) at mail.c:5699
#3  0x00cd6070 in mail_free_body_part (part=0x90755bc) at mail.c:5701
#4  0x00cd5fec in mail_free_body_data (body=0x9075580) at mail.c:5647
#5  0x00cd609f in mail_free_body (body=0xbf8f3c54) at mail.c:5633
#6  0x00bc03c9 in zif_imap_mail_compose (ht=2, return_value=0x925b984, this_ptr=0x0, return_value_used=1) at /web/apache/Install/php4-STABLE-200512130936/ext/imap/php_imap.c:3188
#7  0x00cc27bb in execute (op_array=0x9267ee8) at /web/apache/Install/php4-STABLE-200512130936/Zend/zend_execute.c:1675
#8  0x00cc2a25 in execute (op_array=0x91dcf40) at /web/apache/Install/php4-STABLE-200512130936/Zend/zend_execute.c:1719
#9  0x00cc2a25 in execute (op_array=0x90dd4dc) at /web/apache/Install/php4-STABLE-200512130936/Zend/zend_execute.c:1719
#10 0x00cae617 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /web/apache/Install/php4-STABLE-200512130936/Zend/zend.c:934
#11 0x00c7b6e9 in php_execute_script (primary_file=0xbf90aff4) at /web/apache/Install/php4-STABLE-200512130936/main/main.c:1753
#12 0x00cc8724 in php_handler (r=0x90d33c0) at /web/apache/Install/php4-STABLE-200512130936/sapi/apache2handler/sapi_apache2.c:581
#13 0x08087d8e in ap_run_handler (r=0x90d33c0) at config.c:152
#14 0x08088106 in ap_invoke_handler (r=0x90d33c0) at config.c:364
#15 0x0807ee6d in ap_process_request (r=0x90d33c0) at http_request.c:249
#16 0x0807a72d in ap_process_http_connection (c=0x90cf158) at http_core.c:251
#17 0x080918de in ap_run_process_connection (c=0x90cf158) at connection.c:43
#18 0x0808652e in child_main (child_num_arg=Variable "child_num_arg" is not available.
) at prefork.c:610
#19 0x080866e1 in make_child (s=0x8ff5d68, slot=0) at prefork.c:650
#20 0x080867aa in startup_children (number_to_start=5) at prefork.c:722
#21 0x08086f6c in ap_mpm_run (_pconf=0x8fbb0a8, plog=0x8ff1180, s=0x8ff5d68) at prefork.c:941
#22 0x0808c2e3 in main (argc=2, argv=0xbf90b424) at main.c:618
 [2005-12-13 14:45 UTC]
Please try using this CVS snapshot:
For Windows:

 [2005-12-21 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".
 [2012-01-16 10:00 UTC] hwanghol at gmail dot com
bug in c-client mail_gc_body() function.

 case TYPEMESSAGE:		/* encapsulated message */
    if (body->subtype && !strcmp (body->subtype,"RFC822")) {
      mail_free_stringlist (&body->nested.msg->lines); <--- here
      mail_gc_msg (body->nested.msg,GC_TEXTS);

nested.msg is union.

in source, comparison is uppercase, so try lowercase to subtype.

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Mar 07 07:01:23 2021 UTC