Created
December 10, 2019 17:44
-
-
Save cmb69/712c3b2bec75aebf9c57344a026faa29 to your computer and use it in GitHub Desktop.
PHP bug #78943
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 367dd15b842639b407856c5c5e69904b2631991d Mon Sep 17 00:00:00 2001 | |
From: "Christoph M. Becker" <cmbecker69@gmx.de> | |
Date: Tue, 10 Dec 2019 18:43:01 +0100 | |
Subject: [PATCH] Fix #78943: mail() may release string with refcount==1 twice | |
Since we need `headers_lc` as well as `headers_trim` in the following, | |
we do not release the former even if they are the same string, to avoid | |
complicating the release logic even more. | |
A new test case is not necessary, since we already have | |
mail_basic_alt2-win32.phpt and others. | |
--- | |
win32/sendmail.c | 3 --- | |
1 file changed, 3 deletions(-) | |
diff --git a/win32/sendmail.c b/win32/sendmail.c | |
index ea693ae1f9..273a3737c6 100644 | |
--- a/win32/sendmail.c | |
+++ b/win32/sendmail.c | |
@@ -208,9 +208,6 @@ PHPAPI int TSendMail(char *host, int *error, char **error_message, | |
/* Create a lowercased header for all the searches so we're finally case | |
* insensitive when searching for a pattern. */ | |
headers_lc = zend_string_tolower(headers_trim); | |
- if (headers_lc == headers_trim) { | |
- zend_string_release_ex(headers_lc, 0); | |
- } | |
} | |
/* Fall back to sendmail_from php.ini setting */ | |
-- | |
2.24.0.windows.1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment