Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Jan 2003 09:30:48 -0800 (PST)
From:      Archie Cobbs <archie@packetdesign.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   bin/47560: tar 'z' option gzip'd output has extra garbage
Message-ID:  <200301271730.h0RHUmvn065967@bubba.packetdesign.com>

next in thread | raw e-mail | index | archive | help

>Number:         47560
>Category:       bin
>Synopsis:       tar 'z' option gzip'd output has extra garbage
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 27 09:40:04 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Archie Cobbs
>Release:        FreeBSD 4.7-STABLE i386
>Organization:
Packet Design
>Environment:
System: FreeBSD bubba.packetdesign.com 4.7-STABLE FreeBSD 4.7-STABLE #0: Fri Dec 13 10:11:46 PST 2002 archie@bubba.packetdesign.com:/usr/obj/usr/src/sys/BUBBA i386

>Description:

    'tar cvfz - empty' produces bogus gzip output that has extra
    trailing garbage. This does not corrupt the files but causes
    an error when unpacking.

    'tar cvf - empty | gzip' works fine however.

>How-To-Repeat:

    $ touch empty
    $ tar cvf - empty | gzip | gunzip | md5
    empty
    99a6f2c50591dcebf15eac62ef80b3de
    $ tar cvfz - empty | gunzip | md5
    empty

    gunzip: stdin: decompression OK, trailing garbage ignored
    99a6f2c50591dcebf15eac62ef80b3de
    $ tar cvfz - empty | hd
    empty
    0000000: 1f 8b 08 00 d5 6b 35 3e 00 03 ed ce 3d 0a c2 40  .....k5>....=..@
    0000010: 18 04 d0 3d ca 1e e1 5b d9 9f f3 04 09 68 21 84  ...=...[.....h!.
    0000020: 18 0b 6f af 08 82 8d 58 c5 ea bd 66 8a 99 62 e6  ..o....X...f..b.
    0000030: cb b2 dd d3 be a2 44 f4 5a 53 44 94 d1 e2 33 df  ......D.ZSD...3.
    0000040: 52 8c 5e da a1 b7 11 e5 b9 2f 35 46 ca b1 f3 af  R.^....../5F....
    0000050: 97 db 75 9b d6 9c d3 b4 1e 4f e7 f9 fb ee 57 0f  ..u......O....W.
    0000060: 00 00 00 00 00 00 00 00 00 7f f4 00 5d 5a 6d 79  ............]Zmy
    0000070: 00 28 00 00 00 00 00 00 00 00 00 00 00 00 00 00  .(..............
    0000080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    *
    $ tar cvf - empty |  gzip | hd
    empty
    0000000: 1f 8b 08 00 e1 6b 35 3e 00 03 ed ce 3d 0a c2 40  .....k5>....=..@
    0000010: 18 04 d0 3d ca 1e e1 5b d9 9f f3 04 09 68 21 84  ...=...[.....h!.
    0000020: 18 0b 6f af 08 82 8d 58 c5 ea bd 66 8a 99 62 e6  ..o....X...f..b.
    0000030: cb b2 dd d3 be a2 44 f4 5a 53 44 94 d1 e2 33 df  ......D.ZSD...3.
    0000040: 52 8c 5e da a1 b7 11 e5 b9 2f 35 46 ca b1 f3 af  R.^....../5F....
    0000050: 97 db 75 9b d6 9c d3 b4 1e 4f e7 f9 fb ee 57 0f  ..u......O....W.
    0000060: 00 00 00 00 00 00 00 00 00 7f f4 00 5d 5a 6d 79  ............]Zmy
    0000070: 00 28 00 00                                      .(..

    Notice the extra zeroes in the first output.

>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




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