Date: Sun, 28 Nov 2021 02:05:55 GMT From: Ed Maste <emaste@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 2104a8064951 - stable/13 - mkimg: zero entry in vhdx_write_metadata Message-ID: <202111280205.1AS25t72054880@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=2104a806495173c399ca2709533ab0ab48b708b3 commit 2104a806495173c399ca2709533ab0ab48b708b3 Author: Ed Maste <emaste@FreeBSD.org> AuthorDate: 2021-11-21 00:29:11 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2021-11-28 00:29:30 +0000 mkimg: zero entry in vhdx_write_metadata Otherwise _reserved might contain uninitialized data. MFC after: 1 week Sponsored by: The FreeBSD Foundation (cherry picked from commit 036af1053acd6cae68c5fb6bed30508f2e40be13) --- usr.bin/mkimg/vhdx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.bin/mkimg/vhdx.c b/usr.bin/mkimg/vhdx.c index 4c97b20f5996..744d6e810ca5 100644 --- a/usr.bin/mkimg/vhdx.c +++ b/usr.bin/mkimg/vhdx.c @@ -331,6 +331,7 @@ vhdx_write_metadata(int fd, uint64_t image_size) memset(metadata, 0, SIZE_1MB); memset(&header, 0, sizeof(header)); + memset(&entry, 0, sizeof(entry)); le64enc(&header.signature, VHDX_METADATA_TABLE_HEADER_SIGNATURE); le16enc(&header.entry_count, 5);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202111280205.1AS25t72054880>