Bug #3791: mail() crashes when 4th parameter (headers) is omitted

From: Date: Fri, 10 Mar 2000 13:58:32 +0000
Subject: Bug #3791: mail() crashes when 4th parameter (headers) is omitted
Groups: php.dev 
Request: Send a blank email to php-dev+get-16629@lists.php.net to get a copy of this message
From: wez@ryltech.net Operating system: Win32 PHP version: 3.0.14 PHP Bug Type: Misbehaving function Bug description: mail() crashes when 4th parameter (headers) is omitted A workaround for users is to set 4th parameter to an empty string. The problem is that headers is strstr()ed and otherwise used without checking to see if it is NULL. I have modified the source for sendmail.c so that TSendMail looks like this: int TSendMail(char *host, int *error, char *headers, char *Subject, char *mailTo, char *data) { int ret; char *RPath = NULL; TLS_VARS; if (headers == NULL) headers = ""; ... other code unchanged ... } Also, the Ack() function can be cleaned up some more - I have done this but I don't know who to send my revised source to...

« previous php.dev (#16629) next »