summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1998-09-28 22:04:54 +0000
committerpeter <peter@FreeBSD.org>1998-09-28 22:04:54 +0000
commit501805c399c47f2dcb492b7b1068f73ed911b52d (patch)
treea26dea8c0d84126486f7c1082778b12f8fc7832e
parentbc251566331c2ddeec80b202132b3df2c89ba004 (diff)
downloadFreeBSD-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.c2
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);
OpenPOWER on IntegriCloud