[php-src] PR #13692: Fix GH-13685: Unexpected null pointer in zend_string.h
| From: | nielsdos | Date: | Tue, 12 Mar 2024 20:54:11 +0000 |
| Subject: | [php-src] PR #13692: Fix GH-13685: Unexpected null pointer in zend_string.h | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-25395@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/13692
Author: nielsdos
Regressed in 6fbf81c.
There is a missing error check on spl_filesystem_file_read_line(), which means that if the line
could not be read (e.g. because we're at the end of the file), it will not set
intern->u.file.current_line, which will cause a NULL pointer deref later on.
Fix it by adding a check, and reintroducing the silent flag partially to be able to throw an
exception like it did in the past.