diff options
author | Yasuo Ohgaki <yohgaki@php.net> | 2015-06-19 15:17:56 +0900 |
---|---|---|
committer | Yasuo Ohgaki <yohgaki@php.net> | 2015-06-19 15:17:56 +0900 |
commit | d263ecd8640697d6cde4b71ec722e8a2e5022dcf (patch) | |
tree | ca7144747feeeebf9feb6a3d8e3122fba5763034 | |
parent | dacea3f6fb3f84c79a3412b24547eb2c636754f6 (diff) | |
download | php-git-d263ecd8640697d6cde4b71ec722e8a2e5022dcf.tar.gz |
Move strlen() check to php_mail_detect_multiple_crlf()
-rw-r--r-- | ext/standard/mail.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/standard/mail.c b/ext/standard/mail.c index 1c1332b55e..aa29a22c85 100644 --- a/ext/standard/mail.c +++ b/ext/standard/mail.c @@ -225,7 +225,7 @@ static int php_mail_detect_multiple_crlf(char *hdr) { /* This function detects multiple/malformed multiple newlines. */ size_t len; - if (!hdr) { + if (!hdr || !strlen(hdr)) { return 0; } @@ -320,7 +320,7 @@ PHPAPI int php_mail(char *to, char *subject, char *message, char *headers, char efree(f); } - if (hdr && strlen(hdr) && php_mail_detect_multiple_crlf(hdr)) { + if (hdr && php_mail_detect_multiple_crlf(hdr)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Multiple or malformed newlines found in additional_header"); MAIL_RET(0); } |