mirror of
https://github.com/opnsense/src.git
synced 2026-02-20 00:11:07 -05:00
(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 Reviewed by: pb MFC after: 1 week
This commit is contained in:
parent
9760f68ca0
commit
993425ee98
1 changed files with 1 additions and 1 deletions
|
|
@ -925,7 +925,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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue