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
 [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: Sun May 12 04:01:32 2024 UTC