1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Files
archived-php-src/ext/spl/tests/gh7809.phpt
Christoph M. Becker 0ed39ed809 Fix GH-7809: Cloning a faked SplFileInfo object may segfault
While the `path` is not supposed to be `NULL` for normal operation, it
is possible to create `SplFileInfo` objects where that is the case, and
we must not follow the null pointer.

Closes GH-7814.
2021-12-23 23:10:51 +01:00

13 lines
243 B
PHP

--TEST--
Bug GH-7809 (Cloning a faked SplFileInfo object may segfault)
--FILE--
<?php
class MySplFileInfo extends SplFileInfo {
public function __construct(string $filename) {}
}
$sfi = new MySplFileInfo("foo");
clone $sfi;
?>
--EXPECT--