mirror of
https://github.com/php/php-src.git
synced 2026-04-27 18:23:26 +02:00
Fixed bug #80457
On x32 sizeof(size_t) != sizeof(zend_long), so we need to be careful with sign extension here. Patch by bruno dot premont at restena dot lu.
This commit is contained in:
@@ -2,6 +2,9 @@ PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? ??? ????, PHP 7.3.26
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #80457 (stream_get_contents() fails with maxlength=-1 or default).
|
||||
(bruno dot premont at restena dot lu)
|
||||
|
||||
26 Nov 2020, PHP 7.3.25
|
||||
|
||||
|
||||
@@ -442,7 +442,7 @@ PHP_FUNCTION(stream_get_contents)
|
||||
Z_PARAM_LONG(desiredpos)
|
||||
ZEND_PARSE_PARAMETERS_END_EX(RETURN_FALSE);
|
||||
|
||||
if (maxlen < 0 && maxlen != PHP_STREAM_COPY_ALL) {
|
||||
if (maxlen < 0 && maxlen != (ssize_t)PHP_STREAM_COPY_ALL) {
|
||||
php_error_docref(NULL, E_WARNING, "Length must be greater than or equal to zero, or -1");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user