History log of /php-src/ext/spl/tests/gh13685.phpt (Results 1 – 1 of 1)
Revision Date Author Comments
# aa34e0ac 12-Mar-2024 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-13685: Unexpected null pointer in zend_string.h

Regressed in 6fbf81c.

There is a missing error check on spl_filesystem_file_read_line(), which
means that if the line coul

Fix GH-13685: Unexpected null pointer in zend_string.h

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.

Closes GH-13692.

show more ...