[BusyBox] Tar extract (from pipe) bug

Robert Kaiser rob at sysgo.de
Thu Jul 27 22:52:00 UTC 2000


Hi again,

In revision 1.53, a new bug was accidentally introduced into tar.c:

begin testcase ------------------------------------------------------
BusyBox v0.47pre (2000.07.27-19:32+0000) Built-in shell
Enter 'help' for a list of built-in commands.

/home/rob/busybox/tmp # echo "Hi There!!!!!!" >test
/home/rob/busybox/tmp # tar cf test.tar ./test
/home/rob/busybox/tmp # rm test
/home/rob/busybox/tmp # ls -l
-rw-r--r--    1 rob      eng         2048 Jul 28 00:37 test.tar
/home/rob/busybox/tmp # cat test.tar | tar xvf -
./test
Hi There!!!!!!
/home/rob/busybox/tmp # ls -l
-rw-r--r--    1 rob      eng         2048 Jul 28 00:37 test.tar


emd testcase ---------------------------------------------------------


When tar is asked to extract from stdin, the tar file contents
_not_ extracted, but instead it is dumped to stdout.

Attached is a simplistic patch to fix this.

Cheers

Rob

----------------------------------------------------------------
Robert Kaiser                         email: rkaiser at sysgo.de
SYSGO RTS GmbH
Am Pfaffenstein 14                    phone: (49) 6136 9948-762
D-55270 Klein-Winternheim / Germany   fax:   (49) 6136 9948-10
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: tar-pipe-extract.patch
Url: http://lists.busybox.net/pipermail/busybox/attachments/20000728/034fad59/attachment.diff 


More information about the busybox mailing list