From 07e89ad7408717f74e180903e286e60b5a6e01c8 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Thu, 6 Apr 2017 00:07:11 +0000 Subject: [PATCH] makefs: zero memory NetBSD revs: ffs/buf.c 1.14 Obtained from: NetBSD --- usr.sbin/makefs/ffs/buf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.sbin/makefs/ffs/buf.c b/usr.sbin/makefs/ffs/buf.c index 5d783e7e25b..35c8d7bfe60 100644 --- a/usr.sbin/makefs/ffs/buf.c +++ b/usr.sbin/makefs/ffs/buf.c @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "makefs.h" @@ -219,6 +220,7 @@ getblk(struct vnode *vp, daddr_t blkno, int size, int u1 __unused, n = realloc(bp->b_data, size); if (n == NULL) err(1, "getblk: realloc b_data %ld", bp->b_bcount); + memset(n, 0, size); bp->b_data = n; bp->b_bufsize = size; }