MFC rev. 1.40:

(bread): For a read that is contained entirely within a block, never copy
 out more than size bytes to the caller's buffer.

PR:	bin/111191
This commit is contained in:
thomas 2007-04-12 07:53:13 +00:00
parent 72664e839c
commit ad992339c2

View File

@ -777,7 +777,7 @@ loop:
cnt = cread(diskfd, tmpbuf, secsize, offset - base);
if (cnt != secsize)
goto bad;
xfer = secsize - base;
xfer = MIN(secsize - base, size);
offset += xfer;
bytes -= xfer;
resid = bytes % secsize;