]> granicus.if.org Git - php/commitdiff
fix bug #32810 (fread after tmpfile() reads only 8192 bytes)
authorAntony Dovgal <tony2001@php.net>
Mon, 23 May 2005 11:51:53 +0000 (11:51 +0000)
committerAntony Dovgal <tony2001@php.net>
Mon, 23 May 2005 11:51:53 +0000 (11:51 +0000)
main/streams/streams.c

index be19c80cc5bfca34567730fa608ec0eaca40f7ba..c1d7cb34e1bc2dd8c1e0dc00c77caacee0b940c6 100755 (executable)
@@ -603,8 +603,9 @@ PHPAPI size_t _php_stream_read(php_stream *stream, char *buf, size_t size TSRMLS
                }
 
                /* just break anyway, to avoid greedy read */
-               if (stream->wrapper != &php_plain_files_wrapper)
+               if (stream->wrapper != NULL && stream->wrapper != &php_plain_files_wrapper) {
                        break;
+               }
        }
 
        if (didread > 0) {