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 <scdbackup@gmx.net>
Reviewed by:	kevans
CID:		977470
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39231
This commit is contained in:
Ed Maste 2023-03-23 13:02:44 -04:00
parent d2dab20c2a
commit 9f2a525360

View File

@ -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 */