diff --git a/sys/boot/i386/libi386/i386_copy.c b/sys/boot/i386/libi386/i386_copy.c index 0ff98bac8e41..b01624316061 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);