Nikita Popov
2bcc4ab8f4
Verify that all stubs have a return type
2020-04-03 17:59:30 +02:00
Máté Kocsis
b6229fbca2
Display nullability in type error messages for internal functions
...
Closes GH-5327
2020-03-31 16:55:36 +02:00
Nikita Popov
33ef3d64da
Use separate typedef for bucket comparison function
...
Avoid performing the same casting dance inside each sort compare
function.
2020-03-04 12:46:06 +01:00
George Peter Banyard
5d62f95ec7
Use {0} to initialize instead of {NULL}
...
Clang emits a [-Wmissing-field-initializers] when using {NULL} instead of {0}
2020-02-28 00:21:25 +01:00
Máté Kocsis
960318ed95
Change argument error message format
...
Closes GH-5211
2020-02-26 15:00:08 +01:00
Nikita Popov
328903ca36
Add proper return types to final phar methods
...
As these are final, we can add return types to them.
2020-02-18 10:20:21 +01:00
Máté Kocsis
ac0853eb26
Make type error messages more consistent
...
Closes GH-5092
2020-02-17 14:22:17 +01:00
Christoph M. Becker
7248341ea6
Fix # 79171: heap-buffer-overflow in phar_extract_file
...
We must not access memory outside of the allocated buffer.
2020-02-17 00:20:31 -08:00
Stanislav Malyshev
bcbc053dc1
Fix bug #79082 - Files added to tar with Phar::buildFromIterator have all-access permissions
2020-02-17 00:20:31 -08:00
Nikita Popov
f8d795820e
Reindent phpt files
2020-02-03 22:52:20 +01:00
Nikita Popov
169805777c
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Apply tidy formatting
2020-02-03 13:42:08 +01:00
Nikita Popov
58b17906f5
Apply tidy formatting
...
Mostly reindent PHP scripts to spaces.
2020-02-03 13:41:31 +01:00
Christoph M. Becker
9a5ea0de69
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix #76584 : PharFileInfo::decompress not working
2020-01-28 10:40:00 +01:00
Christoph M. Becker
e197f65b35
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #76584 : PharFileInfo::decompress not working
2020-01-28 10:33:10 +01:00
Christoph M. Becker
136f51f1e1
Fix #76584 : PharFileInfo::decompress not working
...
We actually have to decompress, when told to do so.
2020-01-28 10:31:36 +01:00
Máté Kocsis
99db00b1f2
Fix #78880 Another round
2020-01-19 18:28:43 +01:00
Máté Kocsis
d1764ca330
Make error messages more consistent by fixing capitalization
...
Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
2020-01-17 14:52:46 +01:00
Máté Kocsis
0b4778c377
Fix #78880 : Another bunch of spelling errors
2020-01-16 09:46:47 +01:00
Máté Kocsis
aadd3aaed9
Use RETURN_THROWS() in various places
2020-01-03 21:10:24 +01:00
Máté Kocsis
01a50778d1
Use RETURN_THROWS() after zend_throw_exception() in most of the extensions
2020-01-02 10:56:18 +01:00
Máté Kocsis
345703724c
Use RETURN_THROWS() during ZPP in most of the extensions
...
Except for some bigger ones: reflection, sodium, spl
2019-12-31 11:46:11 +01:00
Dylan T
01875e8b26
phar: fix offset*() prototypes
2019-12-13 10:41:50 +01:00
Dmitry Stogov
62826e95d2
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Call zend_unregister_ini_entries() when unload extension loaded through dl() without MSHUTDOWN callback. Extensions with MSHUTDOWN should use UNREGISTER_INI_ENTRIES().
2019-12-09 15:07:39 +03:00
Dmitry Stogov
92c23e1fd3
Call zend_unregister_ini_entries() when unload extension loaded through dl() without MSHUTDOWN callback.
...
Extensions with MSHUTDOWN should use UNREGISTER_INI_ENTRIES().
2019-12-09 15:05:24 +03:00
Fabien Villepinte
a555cc0b3d
Clean DONE tags from tests
...
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.
Closes GH-4872.
2019-11-07 21:31:47 +01:00
Christoph M. Becker
4d067d811d
Add ext/phar arginfo stubs
2019-11-02 11:55:11 +01:00
Christoph M. Becker
4008704f62
zend_parse_parameters_throw() is obsolete
...
Since `zend_parse_parameters()` throws now, there is no reason to
explicitly call `zend_parse_parameters_throw()` anymore, and since both
have actually the same implementation, we redefine the latter as macro.
2019-11-01 16:47:15 +01:00
Máté Kocsis
9493893412
Cleanup return values when parameter parsing is unsuccessful
2019-10-30 16:05:20 +01:00
Sara Golemon
b8bf8a4372
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Silence undefined index warning when openssl not available.
2019-10-15 15:38:24 -04:00
Sara Golemon
15d7cd9e18
Silence undefined index warning when openssl not available.
2019-10-15 15:37:56 -04:00
Nikita Popov
3df043324e
Merge branch 'PHP-7.4'
2019-10-10 16:15:00 +02:00
Nikita Popov
e4aac082a2
Merge branch 'PHP-7.3' into PHP-7.4
2019-10-10 16:14:52 +02:00
Nikita Popov
74ac3dd6e2
Merge branch 'PHP-7.2' into PHP-7.3
2019-10-10 16:14:37 +02:00
Nikita Popov
46561dab6a
Fix leak in phar open
2019-10-10 16:14:21 +02:00
Christoph M. Becker
375ceefec0
Add missing zend_parse_parameters_none()
2019-10-05 18:22:01 +02:00
Stanislav Malyshev
e043025fda
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix #77919 : Potential UAF in Phar RSHUTDOWN
Update NEWS
Fix bug #78256 (heap-buffer-overflow on exif_process_user_comment)
Fix bug #78222 (heap-buffer-overflow on exif_scan_thumbnail)
2019-07-29 13:20:59 -07:00
Stanislav Malyshev
4adf3dc109
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #77919 : Potential UAF in Phar RSHUTDOWN
Update NEWS
Fix bug #78256 (heap-buffer-overflow on exif_process_user_comment)
Fix bug #78222 (heap-buffer-overflow on exif_scan_thumbnail)
2019-07-29 13:20:52 -07:00
Stanislav Malyshev
d69894734d
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Fix #77919 : Potential UAF in Phar RSHUTDOWN
Update NEWS
Fix bug #78256 (heap-buffer-overflow on exif_process_user_comment)
Fix bug #78222 (heap-buffer-overflow on exif_scan_thumbnail)
2019-07-29 13:20:44 -07:00
Stanislav Malyshev
284fb08fdc
Merge branch 'PHP-7.1' into PHP-7.2
...
* PHP-7.1:
Fix #77919 : Potential UAF in Phar RSHUTDOWN
Update NEWS
Fix bug #78256 (heap-buffer-overflow on exif_process_user_comment)
Fix bug #78222 (heap-buffer-overflow on exif_scan_thumbnail)
2019-07-29 13:19:16 -07:00
Christoph M. Becker
cd1101e8c8
Fix #77919 : Potential UAF in Phar RSHUTDOWN
...
We have to properly clean up in case phar_flush() is failing.
We also make the expectation of the respective test case less liberal
to avoid missing such bugs in the future.
2019-07-29 13:18:27 -07:00
Remi Collet
88a3e80dd1
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix build warnings
2019-07-25 11:50:57 +02:00
Remi Collet
946a1e4314
Fix build warnings
...
- switch from strncpy to memcpy for -Wstringop-truncation
2019-07-25 11:50:44 +02:00
Nikita Popov
173ebe4c44
Merge branch 'PHP-7.4'
2019-07-24 10:44:40 +02:00
Nikita Popov
d9680272c7
Revert "Drop free_filename field from zend_file_handle"
...
This reverts commit e0eca26285 .
free_filename is used by the wincache extension, restore this
field for PHP 7.4.
2019-07-24 10:43:37 +02:00
Nikita Popov
d37d418927
Merge branch 'PHP-7.4'
2019-07-23 11:28:10 +02:00
George Peter Banyard
6d6d954d0d
Cleanup of remaining E_STRICT in tests
2019-07-23 11:27:23 +02:00
Nikita Popov
ac555cf6ee
Merge branch 'PHP-7.4'
2019-07-22 17:56:38 +02:00
Nikita Popov
5664035ffe
Also report errors from Zend stream reader operation
2019-07-22 17:49:08 +02:00
Nikita Popov
a1e2c8870e
Merge branch 'PHP-7.4'
2019-07-22 17:26:01 +02:00
Nikita Popov
d59aac58b3
Report errors from stream read and write operations
...
The php_stream_read() and php_stream_write() functions now return
an ssize_t value, with negative results indicating failure. Functions
like fread() and fwrite() will return false in that case.
As a special case, EWOULDBLOCK and EAGAIN on non-blocking streams
should not be regarded as error conditions, and be reported as
successful zero-length reads/writes instead. The handling of EINTR
remains unclear and is internally inconsistent (e.g. some code-paths
will automatically retry on EINTR, while some won't).
I'm landing this now to make sure the stream wrapper ops API changes
make it into 7.4 -- however, if the user-facing changes turn out to
be problematic we have the option of clamping negative returns to
zero in php_stream_read() and php_stream_write() to restore the
old behavior in a relatively non-intrusive manner.
2019-07-22 17:17:28 +02:00