tony2001 Wed Apr 6 04:26:44 2005 EDT
Modified files: (Branch: PHP_5_0)
/php-src/main/streams streams.c
Log:
MFH: do not try to read after EOF
http://cvs.php.net/diff.php/php-src/main/streams/streams.c?r1=1.61.2.8&r2=1.61.2.9&ty=u
Index: php-src/main/streams/streams.c
diff -u php-src/main/streams/streams.c:1.61.2.8
php-src/main/streams/streams.c:1.61.2.9
--- php-src/main/streams/streams.c:1.61.2.8 Mon Apr 4 23:00:13 2005
+++ php-src/main/streams/streams.c Wed Apr 6 04:26:44 2005
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: streams.c,v 1.61.2.8 2005/04/05 03:00:13 iliaa Exp $ */
+/* $Id: streams.c,v 1.61.2.9 2005/04/06 08:26:44 tony2001 Exp $ */
#define _GNU_SOURCE
#include "php.h"
@@ -836,6 +836,10 @@
php_stream_fill_read_buffer(stream, maxlen TSRMLS_CC);
+ if ((stream->writepos - stream->readpos)<=0) {
+ return NULL;
+ }
+
if (delim_len == 0 || !delim) {
toread = maxlen;
} else {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php