svn commit: r276412 - head/lib/libstand

Nathan Whitehorn nwhitehorn at FreeBSD.org
Tue Dec 30 16:55:54 UTC 2014


Author: nwhitehorn
Date: Tue Dec 30 16:55:53 2014
New Revision: 276412
URL: https://svnweb.freebsd.org/changeset/base/276412

Log:
  Fix loader's ability to read the 10.1 release PowerPC ISOs. There appears to
  be some kind of problem with the version of makefs used for these disks.
  There may be a better way to handle this problem, so I've set the MFC
  timer for a fairly long time period.
  
  MFC after:	2 weeks

Modified:
  head/lib/libstand/cd9660.c

Modified: head/lib/libstand/cd9660.c
==============================================================================
--- head/lib/libstand/cd9660.c	Tue Dec 30 16:22:20 2014	(r276411)
+++ head/lib/libstand/cd9660.c	Tue Dec 30 16:55:53 2014	(r276412)
@@ -151,9 +151,14 @@ susp_lookup_record(struct open_file *f, 
 				return (NULL);
 			p = susp_buffer + isonum_733(shc->offset);
 			end = p + isonum_733(shc->length);
-		} else
+		} else {
 			/* Ignore this record and skip to the next. */
 			p += isonum_711(sh->length);
+
+			/* Avoid infinite loops with corrupted file systems */
+			if (isonum_711(sh->length) == 0)
+				return (NULL);
+		}
 	}
 	return (NULL);
 }


More information about the svn-src-head mailing list