|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-12-13 11:07 UTC] laurent dot bouleau at univ-reims dot fr
Description: ------------ imap_mail_compose crash (Segmentation Fault) if a part of a message is of type message/rfc822 (forward). PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 12 19:00:01 2025 UTC |
In a function like : $enveloppe['from']=$from; $enveloppe['to']=$to; $enveloppe['subject']=$subject; $enveloppe['date']=date('r'); $part[0]['type']=TYPETEXT; $part[0]['subtype']='plain'; $part[0]['encoding']=ENCQUOTEDPRINTABLE; $part[0]['contents.data']=$some_text; $part[1]['type']=TYPEMESSAGE; $part[1]['subtype']='RFC822'; $part[1]['disposition.type']='inline'; $part[1]['contents.data']=$some_rfc_822_text; // The result of imap_mail_compose() is an // exit signal Segmentation fault: (11) // in apache error_log $mail=imap_mail_compose($enveloppe,$part);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. $part[1]['subtype']='rfc822';