The branch stable/13 has been updated by emaste:

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

commit b95746135307c8146e342e55928bc27e1521f035
Author:     Ed Maste <[email protected]>
AuthorDate: 2023-03-23 17:02:44 +0000
Commit:     Ed Maste <[email protected]>
CommitDate: 2023-04-10 13:37:40 +0000

    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, 203646
    Reported by:    Coverity Scan
    Reported by:    Thomas Schmitt <[email protected]>
    Reviewed by:    kevans
    CID:            977470
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D39231
    
    (cherry picked from commit 9f2a525360473a778f91021e3be58fd4bfd72ee5)
---
 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 3628a798db4c..b60e63ee1b53 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 */

Reply via email to