|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-03-19 10:08 UTC] robbie dot wilhelm at gmail dot com
[2008-03-23 21:56 UTC] shire@php.net
[2008-04-08 13:45 UTC] robbie dot wilhelm at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 16:00:02 2025 UTC |
Description: ------------ crash occurs, when parsing certain emails, and accessing the header. print_r (also var_dump) gives output like this: Array ( [return-path] => <hollilula@jungle-world.com> [delivered-to] => r.wagner@20sec.net [received] => Array ( Segmentation fault I am able to access 'return-path', 'date' etc. but on 'received' it will crash. my workaround is to use iconv_mime_decode_headers() on a separat header string. after more investigation... this crash happens only when mailparse functions are used in function or method context. strange... Reproduce code: --------------- function my_mime_parse($file){ $mime=mailparse_msg_parse_file($file); $hdrs=mailparse_msg_get_part_data($mime); mailparse_msg_free($mime); return $hdrs; } print_r(my_mime_parse($file)); testmail: Return-Path: <hollilula@jungle-world.com> Delivered-To: r.wagner@20sec.net Received: from localhost (localhost [127.0.0.1]) by mail.20sec.de (Postfix) with SMTP id B12588E1D9 for <r.wagner@20sec.net>; Thu, 24 Jan 2008 01:01:46 +0100 (CET) Received: from smtp.disko-ev.de (smtp.disko-ev.de [78.47.230.186]) by mail.20sec.de (Postfix) with ESMTP id 77CC08E69E for <r.wagner@20sec.net>; Thu, 24 Jan 2008 01:01:40 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by smtp.disko-ev.de (Postfix) with ESMTP id 1280C3692A6 for <r.wagner@20sec.net>; Thu, 24 Jan 2008 01:01:47 +0100 (CET) X-Amavis-Hold: Maximum number of files (1500) exceeded at (eval 71) line 1264, <GEN137> line 1501. Received: by smtp.disko-ev.de (Postfix, from userid 1000) id A3CD63B1EFB; Thu, 24 Jan 2008 01:01:35 +0100 (CET) Date: Thu, 24 Jan 2008 01:01:34 +0100 From: Roger Rabbit <hlxlx@jungle-world.com> To: r.wagner@20sec.net Subject: pix(es) Message-ID: <20080124000132.GA19016@jones.disko-ev.de> MIME-Version: 1.0 User-Agent: Mutt/1.5.16 (2007-06-09) X-DSPAM-Result: Innocent X-DSPAM-Processed: Thu Jan 24 01:01:46 2008 X-DSPAM-Confidence: 0.9899 X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 4797d56a112601598781208 Content-Type: multipart/mixed; boundary=DSPAM_MULTIPART_EX-11260 Hi R, schlappe 13MB sollten euren Mailserver doch nicht sprengen, oder? N=E4chtle H.