]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Issue 224:Mishandling CD9660 images with RockRidge extensions from FreeBSD makefs.
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Thu, 19 Jan 2012 08:53:30 +0000 (03:53 -0500)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Thu, 19 Jan 2012 08:53:30 +0000 (03:53 -0500)
Merge r4181 from trunk.

SVN-Revision: 4182

libarchive/archive_read_support_format_iso9660.c

index 4f68ef85f30767b992ce0a5db2a06ba78c82f714..739bf91341241e84635c55b13741b69ce20cd670 100644 (file)
@@ -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. */