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 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

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-05-21 18:13 UTC] jimw at cvs dot php dot net
fixed
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 09 11:01:34 2025 UTC