]> granicus.if.org Git - php/commit
Fix #77821: Potential heap corruption in TSendMail()
authorChristoph M. Becker <cmbecker69@gmx.de>
Fri, 29 Mar 2019 10:12:09 +0000 (11:12 +0100)
committerStanislav Malyshev <stas@php.net>
Tue, 30 Apr 2019 05:08:19 +0000 (22:08 -0700)
commit6c631ccfef94f93259d474682f8bfa803e163c87
tree1e03dc08ac9acc7f7fa48170c4fde1d4fc2230c1
parent588db7cecf6cf8b351de0fecdfc7de70f54bf1b1
Fix #77821: Potential heap corruption in TSendMail()

`zend_string_tolower()` returns a copy (not a duplicate) of the given
string, if it is already in lower case.  In this case we must not not
`zend_string_free()` both strings.  The cleanest solution is to call
` zend_string_release()` on both strings, which properly handles the
refcount.
win32/sendmail.c