From 450b1f55328df0dd8294859e37ca66c0f382f614 Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Sat, 13 Feb 2016 21:52:24 -0800 Subject: [PATCH] Issue #659: Fix xar parsing of archives with appleextended ACLs The parser treated the tag as both known and unknown, leaving the parser in a state that prevented it from reading any further attributes. Depending on the order of attributes, this could result in a file with no name, for instance. --- libarchive/archive_read_support_format_xar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libarchive/archive_read_support_format_xar.c b/libarchive/archive_read_support_format_xar.c index 19c1b780e..40308984e 100644 --- a/libarchive/archive_read_support_format_xar.c +++ b/libarchive/archive_read_support_format_xar.c @@ -2168,7 +2168,7 @@ xml_start(struct archive_read *a, const char *name, struct xmlattr_list *list) case FILE_ACL: if (strcmp(name, "appleextended") == 0) xar->xmlsts = FILE_ACL_APPLEEXTENDED; - if (strcmp(name, "default") == 0) + else if (strcmp(name, "default") == 0) xar->xmlsts = FILE_ACL_DEFAULT; else if (strcmp(name, "access") == 0) xar->xmlsts = FILE_ACL_ACCESS; -- 2.47.2