Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Nov 2021 00:38:56 GMT
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 036af1053acd - main - mkimg: zero entry in vhdx_write_metadata
Message-ID:  <202111210038.1AL0cuAh058727@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=036af1053acd6cae68c5fb6bed30508f2e40be13

commit 036af1053acd6cae68c5fb6bed30508f2e40be13
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2021-11-21 00:29:11 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2021-11-21 00:37:25 +0000

    mkimg: zero entry in vhdx_write_metadata
    
    Otherwise _reserved might contain uninitialized data.
    
    MFC after:      1 week
    Sponsored by:   The FreeBSD Foundation
---
 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?202111210038.1AL0cuAh058727>