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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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: Sun Dec 22 01:01:30 2024 UTC