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 */
 
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to