summaryrefslogtreecommitdiff
path: root/main/streams/streams.c
diff options
context:
space:
mode:
authorGustavo André dos Santos Lopes <cataphract@php.net>2011-12-11 21:08:15 +0000
committerGustavo André dos Santos Lopes <cataphract@php.net>2011-12-11 21:08:15 +0000
commit52c36e60c4667456cc61574f9ad2d4ec56f04fa5 (patch)
tree6ba6084eeaef833fc9283c0d5329d3bdbca72a29 /main/streams/streams.c
parent74343ca5067dc58126fc633ad81cbc901c76a879 (diff)
downloadphp-git-52c36e60c4667456cc61574f9ad2d4ec56f04fa5.tar.gz
- Fixed bug #60455: stream_get_line misbehaves if EOF is not detected together
with the last read.
Diffstat (limited to 'main/streams/streams.c')
-rwxr-xr-xmain/streams/streams.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/main/streams/streams.c b/main/streams/streams.c
index 4679a97aa6..d396de30d2 100755
--- a/main/streams/streams.c
+++ b/main/streams/streams.c
@@ -989,9 +989,8 @@ PHPAPI char *php_stream_get_record(php_stream *stream, size_t maxlen, size_t *re
just_read = (stream->writepos - stream->readpos) - len;
len += just_read;
- /* read operation have less data than request; assume the stream is
- * temporarily or permanently out of data */
- if (just_read < toread) {
+ /* Assume the stream is temporarily or permanently out of data */
+ if (just_read == 0) {
break;
}
}