diff options
author | Gustavo André dos Santos Lopes <cataphract@php.net> | 2011-12-11 21:08:15 +0000 |
---|---|---|
committer | Gustavo André dos Santos Lopes <cataphract@php.net> | 2011-12-11 21:08:15 +0000 |
commit | 74d2b2f0bda5ec7b20002f9bf85b64d1e4244175 (patch) | |
tree | 528065b970ceed31bce9a16f35b35f9dd179feb4 /main/streams/streams.c | |
parent | c55f9258b9b971f990e4dd247e0374b7808d5009 (diff) | |
download | php-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-x | main/streams/streams.c | 5 |
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; } } |