From 38e1ef0f4a044d4bb09519cea4f1d3fa1260f68a Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Mon, 28 Sep 1998 22:04:54 +0000 Subject: [PATCH] Only bcopy the correct amount of data from the buffer in case it is ever in an overrun situation. --- sys/boot/i386/libi386/i386_copy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);