diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2002-10-04 18:44:47 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2002-10-04 18:44:47 +0000 |
commit | 08645d53c0efa864694eee32fb5f042cc2696e6b (patch) | |
tree | 6d3b685794c11a09c2eeaf3c813d1aa4550c72e7 | |
parent | 4f7e6dadd8d956c8527007a2f8c976669a762736 (diff) | |
download | php-git-08645d53c0efa864694eee32fb5f042cc2696e6b.tar.gz |
Fixed bug #19746
-rwxr-xr-x | main/streams.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/main/streams.c b/main/streams.c index 2da448aa64..a7cbfc6221 100755 --- a/main/streams.c +++ b/main/streams.c @@ -711,6 +711,8 @@ PHPAPI char *_php_stream_gets(php_stream *stream, char *buf, size_t maxlen TSRML size_t toread = maxlen - 1; if (toread > stream->chunk_size) toread = stream->chunk_size; + else if (toread < stream->chunk_size) + stream->chunk_size = toread; /* XXX: Should not the loop end, if the stream op fails? */ php_stream_fill_read_buffer(stream, toread TSRMLS_CC); |