]> granicus.if.org Git - php/commitdiff
- MFH Fix issue (endless loop) with temp/memory streams
authorMarcus Boerger <helly@php.net>
Thu, 6 Oct 2005 21:31:25 +0000 (21:31 +0000)
committerMarcus Boerger <helly@php.net>
Thu, 6 Oct 2005 21:31:25 +0000 (21:31 +0000)
main/streams/memory.c

index 0b4beaf78ca64149ff81a0eb36ed89084036419d..0342c5b92395776dfb462830386f128473023511 100644 (file)
@@ -313,7 +313,13 @@ static size_t php_stream_temp_read(php_stream *stream, char *buf, size_t count T
        ts = stream->abstract;
        assert(ts != NULL);
 
-       return php_stream_read(ts->innerstream, buf, count);
+       size_t got = php_stream_read(ts->innerstream, buf, count);
+       
+       if (!got) {
+               stream->eof |= ts->innerstream->eof;
+       }
+       
+       return got;
 }
 /* }}} */