tar bugfix patch n.347 (recoded, AGAIN)

Roberto A. Foglietta me at roberto.foglietta.name
Wed Dec 21 20:59:00 UTC 2005


     patch update in order to have it in 1.1.0

PLEASE IGNORE PATCH BEFORE busybox-1.01_raf_3.diff
because they don't work propely or don't work at all.

Create a broken tar.gz (.bz2/.Z show the same)

tar cvzf /tmp/test.tar.gz /bin/bash
dd if=/tmp/test.tar.gz of=/tmp/test.tar.gz0 bs=1k count=10
dd if=/dev/zero >>/tmp/test.tar.gz0 bs=1k count=10

BEFORE patch

./busybox tar tvzf /tmp/test.tar.gz0; echo $?
tar: unexpected end of file

AFTER patch

./busybox tar tvzf /tmp/test.tar.gz0; echo $?
tar: unexpected end of file
tar: null size tar archive

Supposed to fix a possible memory leak in decompress_unzip.c
which should affect static linked one in the case of error.

  Sorry but I did not expect coding for bb would be so hard!
  If somebody would be my tutor and check my patch for the first times I 
will appreciate very much.

Roberto A. Foglietta
SkypeNick: robang74
ICQ#: 108718257

More information about the busybox mailing list