From owner-freebsd-bugs@FreeBSD.ORG Fri Feb 6 13:18:08 2015 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CA3636DA for ; Fri, 6 Feb 2015 13:18:08 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 98514FBD for ; Fri, 6 Feb 2015 13:18:08 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id t16DI8uQ014101 for ; Fri, 6 Feb 2015 13:18:08 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 197371] tar -X does not allow empty file Date: Fri, 06 Feb 2015 13:18:08 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 10.1-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: cejkar@fit.vutbr.cz X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Feb 2015 13:18:08 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197371 Bug ID: 197371 Summary: tar -X does not allow empty file Product: Base System Version: 10.1-STABLE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: bin Assignee: freebsd-bugs@FreeBSD.org Reporter: cejkar@fit.vutbr.cz Created attachment 152617 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=152617&action=edit archive_match.c.diff Please see https://code.google.com/p/libarchive/issues/detail?id=401 What steps will reproduce the problem? 1. Create empty file: touch z 2. Run: tar -tf/dev/null -X z What is the expected output? What do you see instead? What version are you using? bsdtar 2.8.5 - libarchive 2.8.5 (as is in FreeBSD 9.3): $ tar -tf/dev/null -X z $ ... empty output, good bsdtar 3.1.2 - libarchive 3.1.2 (as is in FreeBSD 10.1): $ tar -tf/dev/null -X z tar: Error : Unrecognized archive format $ Warning: The error is not about /dev/null archive format - it is about empty file z archive format, so the error is very misleading. File z could not be any archive in any case. You can try it with real tar file and you will suffer the same results. I do not have deep knowledge of libarchive internals and reading of exclude list seems to be over-complicated to me, so I'm not sure about the correct solution, but something is included here. -- You are receiving this mail because: You are the assignee for the bug.