Commit 7c641f14 7c641f141331e945100674e6054f83d9fcaae892 by Sergey Poznyakoff

(trans_read): Control number of bytes read by stream_read().

1 parent 6c0e046b
......@@ -161,7 +161,7 @@ trans_read (filter_t filter, char *optr, size_t osize, off_t offset,
ret = stream_read (filter->stream, ts->w_buf + ts->w_whd,
MU_TRANS_BSIZE - ts->w_whd, ts->offset,
&wbytes );
if (ret != 0)
if (ret != 0 || wbytes == 0)
break;
ts->offset += wbytes;
ts->w_whd += wbytes;
......