com php-src: Merge branch 'PHP-7.1' into PHP-7.2: win32/sendmail.c

From: Date: Tue, 30 Apr 2019 05:09:04 +0000
Subject: com php-src: Merge branch 'PHP-7.1' into PHP-7.2: win32/sendmail.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-105987@lists.php.net to get a copy of this message
Commit: 2c3933821fe2d401ae128f25047935671c43dd98 Author: Stanislav Malyshev <stas@php.net> Mon, 29 Apr 2019 22:09:04 -0700 Parents: 18a9ae412f00cc1e312c296952fac24f16b4d4de 6c631ccfef94f93259d474682f8bfa803e163c87 Branches: PHP-7.2 PHP-7.3 PHP-7.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=2c3933821fe2d401ae128f25047935671c43dd98 Log: Merge branch 'PHP-7.1' into PHP-7.2 * PHP-7.1: Fix #77821: Potential heap corruption in TSendMail() Bugs: https://bugs.php.net/77821 Changed paths: MM win32/sendmail.c Diff: diff --cc win32/sendmail.c index 62d7105,c11da78..c171eba --- a/win32/sendmail.c +++ b/win32/sendmail.c @@@ -276,11 -290,13 +277,11 @@@ PHPAPI int TSendMail(char *host, int *e efree(RPath); } if (headers) { - zend_string_free(headers_trim); - zend_string_free(headers_lc); + zend_string_release(headers_trim); + zend_string_release(headers_lc); } /* 128 is safe here, the specifier in snprintf isn't longer than that */ - if (NULL == (*error_message = ecalloc(1, HOST_NAME_LEN + 128))) { - return FAILURE; - } + *error_message = ecalloc(1, HOST_NAME_LEN + 128); snprintf(*error_message, HOST_NAME_LEN + 128, "Failed to connect to mailserver at \"%s\" port %d, verify your \"SMTP\" " "and \"smtp_port\" setting in php.ini or use ini_set()",

« previous php.cvs (#105987) next »