com php-src: Fixed bug #71066 (mb_send_mail: Program terminated with signal SIGSEGV, Segmentation fau lt): NEWS ext/mbstring/mbstring.c
| From: | Xinchen Hui | Date: | Wed, 09 Dec 2015 01:47:16 +0000 |
| Subject: | com php-src: Fixed bug #71066 (mb_send_mail: Program terminated with signal SIGSEGV, Segmentation fau lt): NEWS ext/mbstring/mbstring.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-90144@lists.php.net to get a copy of this message | ||
Commit: 84b997020ea47b10172207196136291c5ff09443
Author: Xinchen Hui <laruence@gmail.com> Tue, 8 Dec 2015 17:47:16 -0800
Parents: adb95227676f389788230e3e649cda2b55342948
Branches: PHP-7.0 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=84b997020ea47b10172207196136291c5ff09443
Log:
Fixed bug #71066 (mb_send_mail: Program terminated with signal SIGSEGV, Segmentation fault)
Bugs:
https://bugs.php.net/71066
Changed paths:
M NEWS
M ext/mbstring/mbstring.c
Diff:
diff --git a/NEWS b/NEWS
index 2992667..33bd38c 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,10 @@ PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? Jan 2016 PHP 7.0.2
+- Mbstring:
+ . Fixed bug #71066 (mb_send_mail: Program terminated with signal SIGSEGV,
+ Segmentation fault). (Laruence)
+
- Filter:
. Fixed bug #71063 (filter_input(INPUT_ENV, ..) does not work). (Reeze Xia)
diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c
index c0c622a..09994f6 100644
--- a/ext/mbstring/mbstring.c
+++ b/ext/mbstring/mbstring.c
@@ -4109,11 +4109,12 @@ PHP_FUNCTION(mb_send_mail)
_php_mbstr_parse_mail_headers(&ht_headers, headers, headers_len);
}
- if ((s = zend_hash_str_find_ptr(&ht_headers, "CONTENT-TYPE",
sizeof("CONTENT-TYPE") - 1))) {
+ if ((s = zend_hash_str_find(&ht_headers, "CONTENT-TYPE",
sizeof("CONTENT-TYPE") - 1))) {
char *tmp;
char *param_name;
char *charset = NULL;
+ ZEND_ASSERT(Z_TYPE_P(s) == IS_STRING);
p = strchr(Z_STRVAL_P(s), ';');
if (p != NULL) {