1
0
mirror of https://github.com/php/php-src.git synced 2026-04-27 18:23:26 +02:00
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:
Nikita Popov
2020-12-02 11:26:10 +01:00
parent 685708160e
commit d6fcaf5da4
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -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
+1 -1
View File
@@ -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;
}