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
commit74d2b2f0bda5ec7b20002f9bf85b64d1e4244175 (patch)
tree528065b970ceed31bce9a16f35b35f9dd179feb4 /main/streams/streams.c
parentc55f9258b9b971f990e4dd247e0374b7808d5009 (diff)
downloadphp-git-74d2b2f0bda5ec7b20002f9bf85b64d1e4244175.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 81adff8137..294b3e41a6 100755
--- a/main/streams/streams.c
+++ b/main/streams/streams.c
@@ -918,9 +918,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;
}
}