Module Name: src Committed By: nonaka Date: Wed Mar 28 06:48:55 UTC 2018
Modified Files: src/usr.sbin/makefs/cd9660: cd9660_eltorito.c Log Message: Correctly mark the last El Torito section header. Pointed out by Benno Rice via DM. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/makefs/cd9660/cd9660_eltorito.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.sbin/makefs/cd9660/cd9660_eltorito.c diff -u src/usr.sbin/makefs/cd9660/cd9660_eltorito.c:1.22 src/usr.sbin/makefs/cd9660/cd9660_eltorito.c:1.23 --- src/usr.sbin/makefs/cd9660/cd9660_eltorito.c:1.22 Thu Nov 9 01:28:05 2017 +++ src/usr.sbin/makefs/cd9660/cd9660_eltorito.c Wed Mar 28 06:48:55 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: cd9660_eltorito.c,v 1.22 2017/11/09 01:28:05 nonaka Exp $ */ +/* $NetBSD: cd9660_eltorito.c,v 1.23 2018/03/28 06:48:55 nonaka Exp $ */ /* * Copyright (c) 2005 Daniel Watt, Walter Deignan, Ryan Gabrys, Alan @@ -40,7 +40,7 @@ #include <sys/cdefs.h> #if defined(__RCSID) && !defined(__lint) -__RCSID("$NetBSD: cd9660_eltorito.c,v 1.22 2017/11/09 01:28:05 nonaka Exp $"); +__RCSID("$NetBSD: cd9660_eltorito.c,v 1.23 2018/03/28 06:48:55 nonaka Exp $"); #endif /* !__lint */ #ifdef DEBUG @@ -497,6 +497,12 @@ cd9660_setup_boot(iso9660_disk *diskStru LIST_INSERT_AFTER(head, temp, ll_struct); } + /* Find the last Section Header entry and mark it as the last. */ + head = NULL; + LIST_FOREACH(next, &diskStructure->boot_entries, ll_struct) { + if (next->entry_type == ET_ENTRY_SH) + head = next; + } if (head != NULL) head->entry_data.SH.header_indicator[0] = ET_SECTION_HEADER_LAST;