]> granicus.if.org Git - php/commitdiff
Probable fix for #20180.
authorWez Furlong <wez@php.net>
Fri, 1 Nov 2002 04:58:23 +0000 (04:58 +0000)
committerWez Furlong <wez@php.net>
Fri, 1 Nov 2002 04:58:23 +0000 (04:58 +0000)
main/streams.c

index c680cf3c313db070c3d3973dfe00ecca76802816..990f6763281e4fc09ed4887423d46dc7e6d2fda8 100755 (executable)
@@ -1286,7 +1286,7 @@ static size_t php_stdiop_read(php_stream *stream, char *buf, size_t count TSRMLS
        if (data->fd >= 0) {
                ret = read(data->fd, buf, count);
                
-               if (ret == 0 || (ret < count && errno != EWOULDBLOCK))
+               if (ret == 0 || (ret == -1 && errno != EWOULDBLOCK))
                        stream->eof = 1;
                                
        } else {