Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Mar 2018 22:59:45 +0000 (UTC)
From:      Benno Rice <benno@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r331468 - head/usr.sbin/makefs/cd9660
Message-ID:  <201803232259.w2NMxjrr098019@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: benno
Date: Fri Mar 23 22:59:45 2018
New Revision: 331468
URL: https://svnweb.freebsd.org/changeset/base/331468

Log:
  Don't try to modify El Torito section headers if there aren't any.
  
  MFC after:	1 week

Modified:
  head/usr.sbin/makefs/cd9660/cd9660_eltorito.c

Modified: head/usr.sbin/makefs/cd9660/cd9660_eltorito.c
==============================================================================
--- head/usr.sbin/makefs/cd9660/cd9660_eltorito.c	Fri Mar 23 22:52:26 2018	(r331467)
+++ head/usr.sbin/makefs/cd9660/cd9660_eltorito.c	Fri Mar 23 22:59:45 2018	(r331468)
@@ -468,11 +468,14 @@ cd9660_setup_boot(iso9660_disk *diskStructure, int fir
 	}
 
 	/* 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;
 	}
-	head->entry_data.SH.header_indicator[0] = ET_SECTION_HEADER_LAST;
+	if (head != NULL)
+		head->entry_data.SH.header_indicator[0] =
+		    ET_SECTION_HEADER_LAST;
 
 	/* TODO: Remaining boot disks when implemented */
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803232259.w2NMxjrr098019>