Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 06 Feb 2015 13:18:08 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 197371] tar -X does not allow empty file
Message-ID:  <bug-197371-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-197371-8>