com php-src: fix possible NULL dereference: win32/sendmail.c
[email protected] (Anatol Belski)
| Newsgroups | php.cvs |
|---|---|
| Message-ID | <[email protected]> |
Commit: 8dfa428ccdec0755a8d71b6faeade5ddc0145aab Author: Anatol Belski <[email protected]> Wed, 1 Feb 2017 13:43:33 +0100 Parents: 15404bda138ec073dec382ad71472f461305921b Branches: PHP-7.0 PHP-7.1 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8dfa428ccdec0755a8d71b6faeade5ddc0145aab Log: fix possible NULL dereference Changed paths: M win32/sendmail.c Diff: diff --git a/win32/sendmail.c b/win32/sendmail.c index 28befc3..d460f22 100644 --- a/win32/sendmail.c +++ b/win32/sendmail.c @@ -302,7 +302,7 @@ PHPAPI int TSendMail(char *host, int *error, char **error_message, PW32G(mail_host), !INI_INT("smtp_port") ? 25 : INI_INT("smtp_port")); return FAILURE; } else { - ret = SendText(RPath, Subject, mailTo, mailCc, mailBcc, data, ZSTR_VAL(headers_trim), ZSTR_VAL(headers_lc), error_message); + ret = SendText(RPath, Subject, mailTo, mailCc, mailBcc, data, headers ? ZSTR_VAL(headers_trim) : NULL, headers ? ZSTR_VAL(headers_lc) : NULL, error_message); TSMClose(); if (RPath) { efree(RPath);