summaryrefslogtreecommitdiff
path: root/libarchive/archive_read_support_format_iso9660.c
diff options
context:
space:
mode:
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>2012-01-19 03:11:29 -0500
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>2012-01-19 03:11:29 -0500
commit45968de5e00c1e739777ef17afaa45510a9ee570 (patch)
tree2bb6c68b3cba392fcb51f1dfc4e8fc7ad6042d3c /libarchive/archive_read_support_format_iso9660.c
parent8007f5ddfa4b9604402e22c47e17b331ce153ab7 (diff)
downloadlibarchive-45968de5e00c1e739777ef17afaa45510a9ee570.tar.gz
Issue 224:Mishandling CD9660 images with RockRidge extensions from FreeBSD makefs.
A file size of the symblic link file in ISO images made by makefs is not zero and its location is not negative. That makes ISO reader misleading that that file is a hard like file. We have to check if the file type is symbolic like or not, if so and its file size is not zero, reset the file size to zero and also reset the location to -1. SVN-Revision: 4181
Diffstat (limited to 'libarchive/archive_read_support_format_iso9660.c')
-rw-r--r--libarchive/archive_read_support_format_iso9660.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/libarchive/archive_read_support_format_iso9660.c b/libarchive/archive_read_support_format_iso9660.c
index 942dfe25..da0fec7c 100644
--- a/libarchive/archive_read_support_format_iso9660.c
+++ b/libarchive/archive_read_support_format_iso9660.c
@@ -1907,6 +1907,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. */