aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorToomas Soome <tsoome@FreeBSD.org>2016-09-30 22:28:20 +0000
committerToomas Soome <tsoome@FreeBSD.org>2016-09-30 22:28:20 +0000
commit339e076e677cd869e3d121a75e05543604c773e4 (patch)
treeaad7f574842404e0c99ac5188255a1c06d20a4d3 /lib
parent76a46b29186caf1b649bcf7a26c41ba54074c9b9 (diff)
Notes
Diffstat (limited to 'lib')
-rw-r--r--lib/libstand/cd9660.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/libstand/cd9660.c b/lib/libstand/cd9660.c
index 5d9b57b65ccc2..e71d36f973c2c 100644
--- a/lib/libstand/cd9660.c
+++ b/lib/libstand/cd9660.c
@@ -353,7 +353,15 @@ cd9660_open(const char *path, struct open_file *f)
dp = (struct iso_directory_record *)
((char *) dp + isonum_711(dp->length));
- off += isonum_711(dp->length);
+
+ /* if the new block is zero length, its padding */
+ if (isonum_711(dp->length) == 0) {
+ /* skip to next block, if any */
+ off = boff * ISO_DEFAULT_BLOCK_SIZE;
+ continue;
+ } else {
+ off += isonum_711(dp->length);
+ }
}
if (off >= dsize) {
rc = ENOENT;