From 8b134356efa8d3b811082b0c946b962c25a26b9c Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 1 Jun 2005 15:11:44 +0000 Subject: Disabled search of recored separator outside of buffer --- main/streams/streams.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'main') diff --git a/main/streams/streams.c b/main/streams/streams.c index 8b0ee5a3d2..56ef78d525 100755 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -852,9 +852,9 @@ PHPAPI char *php_stream_get_record(php_stream *stream, size_t maxlen, size_t *re toread = maxlen; } else { if (delim_len == 1) { - e = memchr(stream->readbuf + stream->readpos, *delim, stream->readbuflen - stream->readpos); + e = memchr(stream->readbuf + stream->readpos, *delim, stream->writepos - stream->readpos); } else { - e = php_memnstr(stream->readbuf + stream->readpos, delim, delim_len, (stream->readbuf + stream->readbuflen)); + e = php_memnstr(stream->readbuf + stream->readpos, delim, delim_len, (stream->readbuf + stream->writepos)); } if (!e) { -- cgit v1.2.1