From 9f2a525360473a778f91021e3be58fd4bfd72ee5 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Thu, 23 Mar 2023 13:02:44 -0400 Subject: [PATCH] makefs: correct El Torito bood record The boot catalog pointer is a DWord, but we previously populated it via cd9660_bothendian_dword which overwrote four unused bytes following it. See El Torito 1.0 (1995) Figure 7 for details. PR: 203531 Reported by: Coverity Scan Reported by: Thomas Schmitt Reviewed by: kevans CID: 977470 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39231 --- usr.sbin/makefs/cd9660/cd9660_eltorito.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/makefs/cd9660/cd9660_eltorito.c b/usr.sbin/makefs/cd9660/cd9660_eltorito.c index 3628a798db4..b60e63ee1b5 100644 --- a/usr.sbin/makefs/cd9660/cd9660_eltorito.c +++ b/usr.sbin/makefs/cd9660/cd9660_eltorito.c @@ -377,8 +377,8 @@ cd9660_setup_boot(iso9660_disk *diskStructure, int first_sector) /* Point to catalog: For now assume it consumes one sector */ ELTORITO_DPRINTF(("Boot catalog will go in sector %d\n", first_sector)); diskStructure->boot_catalog_sector = first_sector; - cd9660_bothendian_dword(first_sector, - diskStructure->boot_descriptor->boot_catalog_pointer); + cd9660_731(first_sector, + diskStructure->boot_descriptor->boot_catalog_pointer); /* Step 1: Generate boot catalog */ /* Step 1a: Validation entry */