From bc8a206172256072a26891e8b40b8bd6e48c977a Mon Sep 17 00:00:00 2001 From: yasuoka Date: Tue, 31 Oct 2017 13:29:42 +0000 Subject: Initialize boot_catalog_entry's entry_type properly. This had been missing but the type was used in cd9660_setup_boot(). seem fine deraadt --- usr.sbin/makefs/cd9660/cd9660_eltorito.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'usr.sbin/makefs') diff --git a/usr.sbin/makefs/cd9660/cd9660_eltorito.c b/usr.sbin/makefs/cd9660/cd9660_eltorito.c index 409298d5ca6..0fa3091c2da 100644 --- a/usr.sbin/makefs/cd9660/cd9660_eltorito.c +++ b/usr.sbin/makefs/cd9660/cd9660_eltorito.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd9660_eltorito.c,v 1.9 2016/12/17 16:22:04 krw Exp $ */ +/* $OpenBSD: cd9660_eltorito.c,v 1.10 2017/10/31 13:29:42 yasuoka Exp $ */ /* $NetBSD: cd9660_eltorito.c,v 1.20 2013/01/28 21:03:28 christos Exp $ */ /* @@ -221,6 +221,7 @@ cd9660_boot_setup_validation_entry(char sys) size_t i; entry = cd9660_init_boot_catalog_entry(); + entry->entry_type = ET_ENTRY_VE; ve = &entry->entry_data.VE; ve->header_id[0] = 1; @@ -255,6 +256,7 @@ cd9660_boot_setup_default_entry(struct cd9660_boot_image *disk) if (default_entry == NULL) return NULL; + default_entry->entry_type = ET_ENTRY_IE; ie = &default_entry->entry_data.IE; ie->boot_indicator[0] = disk->bootable; @@ -282,6 +284,7 @@ cd9660_boot_setup_section_head(char platform) if (entry == NULL) return NULL; + entry->entry_type = ET_ENTRY_SH; sh = &entry->entry_data.SH; /* More by default. The last one will manually be set to 0x91 */ sh->header_indicator[0] = ET_SECTION_HEADER_MORE; @@ -298,6 +301,7 @@ cd9660_boot_setup_section_entry(struct cd9660_boot_image *disk) if ((entry = cd9660_init_boot_catalog_entry()) == NULL) return NULL; + entry->entry_type = ET_ENTRY_SE; se = &entry->entry_data.SE; se->boot_indicator[0] = ET_BOOTABLE; -- cgit v1.2.3-59-g8ed1b