com php-src: Fixed bug #74510 win32/sendmail.c anchors CC header but not BCC: win32/sendmail.c

[email protected] (Anatol Belski)
Newsgroups php.cvs
Message-ID <[email protected]>
Commit:    20a608d9dae4c758bf608e10fd2cdb9cc1559625
Author:    Anatol Belski <[email protected]>         Tue, 2 May 2017 12:31:00 +0200
Parents:   4c0e50c88ac49052c61d1f23d5797e5d00384524
Branches:  PHP-7.0 PHP-7.1 master

Link:       http://git.php.net/?p=php-src.git;a=commitdiff;h=20a608d9dae4c758bf608e10fd2cdb9cc1559625

Log:
Fixed bug #74510 win32/sendmail.c anchors CC header but not BCC

Bugs:
https://bugs.php.net/74510

Changed paths:
  M  win32/sendmail.c


Diff:
diff --git a/win32/sendmail.c b/win32/sendmail.c
index d460f22..d83663a 100644
--- a/win32/sendmail.c
+++ b/win32/sendmail.c
@@ -535,7 +535,7 @@ static int SendText(char *RPath, char *Subject, char *mailTo, char *mailCc, char
 		efree(tempMailTo);
 	}
 	else if (headers) {
-		if (pos1 = strstr(headers_lc, "bcc:")) {
+		if ((pos1 = strstr(headers_lc, "bcc:")) && (pos1 == headers_lc || *(pos1-1) == '\n')) {
 			/* Real offset is memaddress from the original headers + difference of
 			 * string found in the lowercase headrs + 4 characters to jump over
 			 * the bcc: */
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.