Fix #78863: DirectoryIterator class silently truncates after a null byte
authorChristoph M. Becker <cmbecker69@gmx.de>
Mon, 25 Nov 2019 15:56:34 +0000 (16:56 +0100)
committerStanislav Malyshev <stas@php.net>
Mon, 16 Dec 2019 08:02:57 +0000 (00:02 -0800)
commita5a15965da23c8e97657278fc8dfbf1dfb20c016
tree1ade216c45ecbb3343f0763aeb15e70a8ef541b6
parentd2cfb63f020a6f39de5d6c7189f65d2191432877
Fix #78863: DirectoryIterator class silently truncates after a null byte

Since the constructor of DirectoryIterator and friends is supposed to
accepts paths (i.e. strings without NUL bytes), we must not accept
arbitrary strings.
ext/spl/spl_directory.c
ext/spl/tests/bug78863.phpt [new file with mode: 0644]