From 1b570ceee1241d21462b2840596f6017cf59937f Mon Sep 17 00:00:00 2001 From: Michihiro NAKAJIMA Date: Sun, 1 Nov 2009 03:47:46 -0500 Subject: [PATCH] Do not reject a directory entry which couldn't find the original place of itself. SVN-Revision: 1567 --- libarchive/archive_read_support_format_iso9660.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libarchive/archive_read_support_format_iso9660.c b/libarchive/archive_read_support_format_iso9660.c index bec477c14..5d9925583 100644 --- a/libarchive/archive_read_support_format_iso9660.c +++ b/libarchive/archive_read_support_format_iso9660.c @@ -1062,9 +1062,12 @@ relocate_dir(struct iso9660 *iso9660, struct file_info *file) struct file_info *re; re = heap_get_entry(&(iso9660->re_dirs)); - while (re != NULL && re->offset < file->cl_offset) - /* This case is wrong pattern. */ + while (re != NULL && re->offset < file->cl_offset) { + /* This case is wrong pattern. + * But dont't reject this directory entry to be robust. */ + cache_add_entry(iso9660, re); re = heap_get_entry(&(iso9660->re_dirs)); + } if (re == NULL) /* This case is wrong pattern. */ return (0); @@ -1126,7 +1129,7 @@ read_entries(struct archive_read *a) * Add rr_moved into pending_files to show */ if (iso9660->rr_moved->subdirs) - add_entry(iso9660, iso9660->rr_moved); + cache_add_entry(iso9660, iso9660->rr_moved); else { iso9660->rr_moved->parent->subdirs--; release_file(iso9660, iso9660->rr_moved); -- 2.47.3