summaryrefslogtreecommitdiff
path: root/ext/spl/spl_directory.c
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2019-01-09 14:26:18 +0100
committerStanislav Malyshev <stas@php.net>2019-03-03 18:23:46 -0800
commit254a5914ad7f9dbdc4f6090229f6b0f4317a695e (patch)
treecb39a1c9c782c947946ac9d5dbcd794061f472a9 /ext/spl/spl_directory.c
parent7f0ab7c20c83a52862ad7c8acf31c3fa739f1274 (diff)
downloadphp-git-254a5914ad7f9dbdc4f6090229f6b0f4317a695e.tar.gz
Fix #77431 SplFileInfo::__construct() accepts NUL bytes
`SplFileInfo::__construct()` has to expect a path instead of a string, analogous to `SplFileObject::__construct()`.
Diffstat (limited to 'ext/spl/spl_directory.c')
-rw-r--r--ext/spl/spl_directory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c
index fc4001ae1f..748b1549b5 100644
--- a/ext/spl/spl_directory.c
+++ b/ext/spl/spl_directory.c
@@ -1110,7 +1110,7 @@ SPL_METHOD(SplFileInfo, __construct)
char *path;
size_t len;
- if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "s", &path, &len) == FAILURE) {
+ if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "p", &path, &len) == FAILURE) {
return;
}