Only bcopy the correct amount of data from the buffer in case it is ever

in an overrun situation.
This commit is contained in:
Peter Wemm 1998-09-28 22:04:54 +00:00
parent 29a1d9c4e6
commit 38e1ef0f4a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=39733

View File

@ -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);