]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Make sure a local variable 'parent' is not NULL when access to its member.
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Wed, 14 Sep 2011 07:41:17 +0000 (03:41 -0400)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Wed, 14 Sep 2011 07:41:17 +0000 (03:41 -0400)
SVN-Revision: 3709

libarchive/archive_read_support_format_iso9660.c

index e57c97418ff621762740f689f9347450c9da2da4..8c742f880be7ed7f1bf2ab425d7f1301ac2fe385 100644 (file)
@@ -1932,7 +1932,7 @@ parse_file_info(struct archive_read *a, struct file_info *parent,
                else if (parent != NULL && (flags & 0x02) &&
                    (parent->re || parent->re_descendant))
                        file->re_descendant = 1;
-               if (file->cl_offset != 0) {
+               if (parent != NULL && file->cl_offset != 0) {
                        parent->subdirs++;
                        /* Overwrite an offset and a number of this "CL" entry
                         * to appear before other dirs. "+1" to those is to