mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 03:49:02 +00:00
Only bcopy the correct amount of data from the buffer in case it is ever
in an overrun situation.
This commit is contained in:
parent
29a1d9c4e6
commit
38e1ef0f4a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=39733
@ -53,7 +53,7 @@ i386_readin(int fd, vm_offset_t dest, size_t len)
|
||||
got = read(fd, buf, get);
|
||||
if (got <= 0)
|
||||
break;
|
||||
bcopy(buf, PTOV(dest), chunk);
|
||||
bcopy(buf, PTOV(dest), got);
|
||||
}
|
||||
free(buf);
|
||||
return(len - resid);
|
||||
|
Loading…
Reference in New Issue
Block a user