php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3401 mail() crashes when not passing additional header
Submitted: 2000-02-04 04:45 UTC Modified: 2000-05-21 18:13 UTC
From: japj at oce dot nl Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 3.0.14 OS: Windows 2000
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: japj at oce dot nl
New email:
PHP Version: OS:

 

 [2000-02-04 04:45 UTC] japj at oce dot nl
the following script crashes php3 when trying to send a mail:

<?
mail("japj@oce.nl","Test Mail","Some text");
?>

building a debug build of PHP3 shows that SendText in "win32\sendmail.c" uses the headers variable in a strstr action. Unfortunately when not specifying the optional headers parameter in mail() the headers variable is NULL and this crashes PHP3.

WORKAROUND at the moment is to do the following:

<?
mail("japj@oce.nl","Test Mail","Some text","");
?>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-05-21 18:13 UTC] jimw at cvs dot php dot net
fixed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jun 04 16:01:33 2024 UTC