From: Michihiro NAKAJIMA Date: Thu, 19 Jan 2012 08:53:59 +0000 (-0500) Subject: Issue 224:Mishandling CD9660 images with RockRidge extensions from FreeBSD makefs. X-Git-Tag: v3.0.4~2^2~169^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=41114b2ba93ea10d0f6f1e6f47b51356ad7b0ff8;p=thirdparty%2Flibarchive.git Issue 224:Mishandling CD9660 images with RockRidge extensions from FreeBSD makefs. Merge r4181 from trunk. SVN-Revision: 4183 --- diff --git a/libarchive/archive_read_support_format_iso9660.c b/libarchive/archive_read_support_format_iso9660.c index 85927444c..52944e0ae 100644 --- a/libarchive/archive_read_support_format_iso9660.c +++ b/libarchive/archive_read_support_format_iso9660.c @@ -1775,6 +1775,19 @@ parse_file_info(struct archive_read *a, struct file_info *parent, free(file); return (NULL); } + /* + * A file size of symbolic link files in ISO images + * made by makefs is not zero and its location is + * the same as those of next regular file. That is + * the same as hard like file and it causes unexpected + * error. + */ + if (file->size > 0 && + (file->mode & AE_IFMT) == AE_IFLNK) { + file->size = 0; + file->number = -1; + file->offset = -1; + } } else /* If there isn't SUSP, disable parsing * rock ridge extensions. */