summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--ext/standard/streamsfuncs.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 05564d1250..ddeb68adfa 100644
--- a/NEWS
+++ b/NEWS
@@ -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
diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c
index 99632a6de8..1a8bd01190 100644
--- a/ext/standard/streamsfuncs.c
+++ b/ext/standard/streamsfuncs.c
@@ -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;
}