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

index 144b24cc900c6b16783ebd50bfc4b7700d1a1175..432cd9fa1f56fef5d6400a6b81a9d1ec6e7c3349 100755 (executable)
@@ -592,8 +592,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) {