summaryrefslogtreecommitdiffstats
path: root/usr.sbin/makefs
diff options
context:
space:
mode:
authoryasuoka <yasuoka@openbsd.org>2017-10-31 13:29:42 +0000
committeryasuoka <yasuoka@openbsd.org>2017-10-31 13:29:42 +0000
commitbc8a206172256072a26891e8b40b8bd6e48c977a (patch)
treea79505066cc1ca842f8db9be9afededa61bfb937 /usr.sbin/makefs
parentMerge type forward declarations with real ones as soon as they are found. (diff)
downloadwireguard-openbsd-bc8a206172256072a26891e8b40b8bd6e48c977a.tar.xz
wireguard-openbsd-bc8a206172256072a26891e8b40b8bd6e48c977a.zip
Initialize boot_catalog_entry's entry_type properly. This had been
missing but the type was used in cd9660_setup_boot(). seem fine deraadt
Diffstat (limited to 'usr.sbin/makefs')
-rw-r--r--usr.sbin/makefs/cd9660/cd9660_eltorito.c6
1 files changed, 5 insertions, 1 deletions
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;