summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authornwhitehorn <nwhitehorn@FreeBSD.org>2015-01-14 21:23:46 +0000
committernwhitehorn <nwhitehorn@FreeBSD.org>2015-01-14 21:23:46 +0000
commit612ef79eb033fe15748954c3928590149312d47c (patch)
treee506615e8f9b215666237191fbb19cadf241dc67 /lib
parentb93020e9d58b34551619141e0337311bba6db2f1 (diff)
downloadFreeBSD-src-612ef79eb033fe15748954c3928590149312d47c.zip
FreeBSD-src-612ef79eb033fe15748954c3928590149312d47c.tar.gz
MFC r276412:
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.
Diffstat (limited to 'lib')
-rw-r--r--lib/libstand/cd9660.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/libstand/cd9660.c b/lib/libstand/cd9660.c
index c6bcef2..91a091b 100644
--- a/lib/libstand/cd9660.c
+++ b/lib/libstand/cd9660.c
@@ -151,9 +151,14 @@ susp_lookup_record(struct open_file *f, const char *identifier,
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);
}
OpenPOWER on IntegriCloud