mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
- Fixed bug #51732, Fileinfo __construct or open does not work with NULL
This commit is contained in:
parent
3a15e98155
commit
fdf0395e49
3 changed files with 7 additions and 7 deletions
2
NEWS
2
NEWS
|
@ -39,6 +39,8 @@ PHP NEWS
|
|||
requests (Fixes CVE-2010-0397, bug #51288). (Raphael Geissert)
|
||||
- Fixed 64-bit integer overflow in mhash_keygen_s2k(). (Clément LECIGNE, Stas)
|
||||
|
||||
- Fixed bug #51732 (Fileinfo __construct or open does not work with NULL).
|
||||
(Pierre)
|
||||
- Fixed bug #51723 (Content-length header is limited to 32bit integer with
|
||||
Apache2 on Windows). (Pierre)
|
||||
- Fixed bug #51690 (Phar::setStub looks for case-sensitive
|
||||
|
|
|
@ -291,7 +291,9 @@ PHP_FUNCTION(finfo_open)
|
|||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (file && *file) { /* user specified file, perform open_basedir checks */
|
||||
if (file_len == 0) {
|
||||
file = NULL;
|
||||
} else if (file && *file) { /* user specified file, perform open_basedir checks */
|
||||
if (!VCWD_REALPATH(file, resolved_path)) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
|
|
@ -16,12 +16,8 @@ var_dump(finfo_open(FILEINFO_MIME, '/foo/bar/inexistent'));
|
|||
--EXPECTF--
|
||||
Warning: finfo_open(): Failed to load magic database at ''. in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: finfo_open(): Failed to load magic database at ''. in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: finfo_open(): Failed to load magic database at ''. in %s on line %d
|
||||
bool(false)
|
||||
resource(%d) of type (file_info)
|
||||
resource(%d) of type (file_info)
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(false)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue