diff options
author | Antony Dovgal <tony2001@php.net> | 2005-04-06 08:26:06 +0000 |
---|---|---|
committer | Antony Dovgal <tony2001@php.net> | 2005-04-06 08:26:06 +0000 |
commit | e7a2efe053a41742b1305ed5e88b158be156e7e8 (patch) | |
tree | c5af2830137296d1eb83c529b350afcc4b7f8439 /main/streams/streams.c | |
parent | f6ecb58448628ce1049db1d8aa3de5a28170160a (diff) | |
download | php-git-e7a2efe053a41742b1305ed5e88b158be156e7e8.tar.gz |
do not try to read after EOF
Diffstat (limited to 'main/streams/streams.c')
-rwxr-xr-x | main/streams/streams.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/main/streams/streams.c b/main/streams/streams.c index 23b894b2b0..66956a2977 100755 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -847,6 +847,10 @@ PHPAPI char *php_stream_get_record(php_stream *stream, size_t maxlen, size_t *re php_stream_fill_read_buffer(stream, maxlen TSRMLS_CC); + if ((stream->writepos - stream->readpos)<=0) { + return NULL; + } + if (delim_len == 0 || !delim) { toread = maxlen; } else { |