php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56007 Segmentation fault
Submitted: 2004-03-17 05:20 UTC Modified: 2005-02-28 01:28 UTC
From: btomic at alterbox dot hr Assigned: wez (profile)
Status: Closed Package: mailparse (PECL)
PHP Version: 4.3.4 OS: Linux SuSe 8.2
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:
Package:
Bug Type:
Summary:
From: btomic at alterbox dot hr
New email:
PHP Version: OS:

 

 [2004-03-17 05:20 UTC] btomic at alterbox dot hr
Description:
------------
If function mailparse_msg_get_part returns its result into variable I get segmentation fault. I use buffer for message sotrage. If I do:

mailparse_msg_get_part_data(mailparse_msg_get_part($mail,$st))

then everiting is ok.

But problem is whan I do:

$section = mailparse_msg_get_part($mail, $st);
$info = mailparse_msg_get_part_data($section); 

Code below send big output I do not know why. Some times code succeeds without error but that are rare cases and output is still there.

Reproduce code:
---------------
$mail=mailparse_msg_create();
$mbody=$pop->retr(key($list_mess));
mailparse_msg_parse($mail, $mbody);
$struc=mailparse_msg_get_structure($mail);
foreach($struc as $st){
	$temp=mailparse_msg_get_part($mail, $st);
	mailparse_msg_get_part_data($temp);
	mailparse_msg_extract_part($temp, $mbody);
}
mailparse_msg_free($mail);

Expected result:
----------------
Nothing, the code should just execute without any output.

Actual result:
--------------
I get output. It seems to be message. And usually I get segmentation fault in apache error_log file.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-03-30 04:32 UTC] btomic at alterbox dot hr
I was wrong it should send output but segmentation fault is still here. Also version is not 4.3.3 but 4.3.4.
 [2005-02-28 01:28 UTC] wez@php.net
Please try latest mailparse version, and re-open this report if the problem persists.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 05:01:27 2024 UTC