]> granicus.if.org Git - php/commitdiff
Fixed bug #74510 win32/sendmail.c anchors CC header but not BCC
authorAnatol Belski <ab@php.net>
Tue, 2 May 2017 10:31:00 +0000 (12:31 +0200)
committerAnatol Belski <ab@php.net>
Tue, 2 May 2017 10:31:00 +0000 (12:31 +0200)
win32/sendmail.c

index d460f22fda5b8d60a811a8d2434c8b0bd72c65d2..d83663a47526070516d436cedeef96b0d0a11638 100644 (file)
@@ -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: */