diff options
author | peter <peter@FreeBSD.org> | 1998-09-28 22:04:54 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1998-09-28 22:04:54 +0000 |
commit | 501805c399c47f2dcb492b7b1068f73ed911b52d (patch) | |
tree | a26dea8c0d84126486f7c1082778b12f8fc7832e | |
parent | bc251566331c2ddeec80b202132b3df2c89ba004 (diff) | |
download | FreeBSD-src-501805c399c47f2dcb492b7b1068f73ed911b52d.zip FreeBSD-src-501805c399c47f2dcb492b7b1068f73ed911b52d.tar.gz |
Only bcopy the correct amount of data from the buffer in case it is ever
in an overrun situation.
-rw-r--r-- | sys/boot/i386/libi386/i386_copy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/boot/i386/libi386/i386_copy.c b/sys/boot/i386/libi386/i386_copy.c index 0ff98ba..b016243 100644 --- a/sys/boot/i386/libi386/i386_copy.c +++ b/sys/boot/i386/libi386/i386_copy.c @@ -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); |