[php-src] PR #22254: mbstring: Fix memory leak in mail header parsing
| From: | iliaal | Date: | Sun, 07 Jun 2026 21:09:26 +0000 |
| Subject: | [php-src] PR #22254: mbstring: Fix memory leak in mail header parsing | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-36340@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/22254
Author: iliaal
A mail header consisting of a field name with no value (the input ends right after the colon) leaves
the fld_name zend_string allocated but never released, because the cleanup only runs when both
fld_name and fld_val are set. Reproduces via mb_send_mail() with a header like "X-Leak:".
It is released in both the loop-body and end-of-input branches.