From: Michihiro NAKAJIMA Date: Wed, 14 Sep 2011 07:41:17 +0000 (-0400) Subject: Make sure a local variable 'parent' is not NULL when access to its member. X-Git-Tag: v3.0.0a~52 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5b8e58eddef342a8e9ccfa3d46e4be3196b4823;p=thirdparty%2Flibarchive.git Make sure a local variable 'parent' is not NULL when access to its member. SVN-Revision: 3709 --- diff --git a/libarchive/archive_read_support_format_iso9660.c b/libarchive/archive_read_support_format_iso9660.c index e57c97418..8c742f880 100644 --- a/libarchive/archive_read_support_format_iso9660.c +++ b/libarchive/archive_read_support_format_iso9660.c @@ -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