mirror of
https://github.com/php/php-src.git
synced 2024-09-21 09:57:23 +00:00
Merge branch 'PHP-8.2' into PHP-8.3
This commit is contained in:
commit
ea83eba590
4
NEWS
4
NEWS
@ -23,6 +23,10 @@ PHP NEWS
|
||||
. Fixed bug GH-15654 (Signed integer overflow in ext/dom/nodelist.c).
|
||||
(nielsdos)
|
||||
|
||||
- Fileinfo:
|
||||
. Fixed bug GH-15752 (Incorrect error message for finfo_file
|
||||
with an empty filename argument). (DanielEScherzer)
|
||||
|
||||
- MySQLnd:
|
||||
. Fixed bug GH-15432 (Heap corruption when querying a vector). (cmb,
|
||||
Kamil Tekiela)
|
||||
|
@ -373,12 +373,14 @@ static void _php_finfo_get_type(INTERNAL_FUNCTION_PARAMETERS, int mode, int mime
|
||||
php_stream_wrapper *wrap;
|
||||
php_stream_statbuf ssb;
|
||||
|
||||
// Implementation is used for both finfo_file() and mimetype_emu()
|
||||
int buffer_param_num = (mimetype_emu ? 1 : 2);
|
||||
if (buffer == NULL || buffer_len == 0) {
|
||||
zend_argument_value_error(1, "cannot be empty");
|
||||
zend_argument_value_error(buffer_param_num, "cannot be empty");
|
||||
goto clean;
|
||||
}
|
||||
if (CHECK_NULL_PATH(buffer, buffer_len)) {
|
||||
zend_argument_type_error(1, "must not contain any null bytes");
|
||||
zend_argument_type_error(buffer_param_num, "must not contain any null bytes");
|
||||
goto clean;
|
||||
}
|
||||
|
||||
|
@ -21,8 +21,8 @@ var_dump(finfo_file($fp, '&'));
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
finfo_file(): Argument #1 ($finfo) must not contain any null bytes
|
||||
finfo_file(): Argument #1 ($finfo) cannot be empty
|
||||
finfo_file(): Argument #2 ($filename) must not contain any null bytes
|
||||
finfo_file(): Argument #2 ($filename) cannot be empty
|
||||
string(9) "directory"
|
||||
|
||||
Warning: finfo_file(&): Failed to open stream: No such file or directory in %s on line %d
|
||||
|
@ -25,4 +25,4 @@ try {
|
||||
string(28) "text/x-php; charset=us-ascii"
|
||||
string(22) "PHP script, ASCII text"
|
||||
string(28) "text/plain; charset=us-ascii"
|
||||
finfo_file(): Argument #1 ($finfo) must not contain any null bytes
|
||||
finfo_file(): Argument #2 ($filename) must not contain any null bytes
|
||||
|
Loading…
Reference in New Issue
Block a user