Index: head/sys/boot/common/bcache.c =================================================================== --- head/sys/boot/common/bcache.c +++ head/sys/boot/common/bcache.c @@ -303,7 +303,9 @@ break; } - size = i * bcache_blksize; + if (size > i * bcache_blksize) + size = i * bcache_blksize; + if (size != 0) { bcopy(bc->bcache_data + (bcache_blksize * BHASH(bc, blk)) + offset, buf, size);