[BusyBox 0000640]: tar fails to extract correctly 100 chars path files
bugs at busybox.net
bugs at busybox.net
Fri Jan 13 14:01:43 UTC 2006
The following issue has been SUBMITTED.
======================================================================
http://busybox.net/bugs/view.php?id=640
======================================================================
Reported By: grap
Assigned To: BusyBox
======================================================================
Project: BusyBox
Issue ID: 640
Category: Other
Reproducibility: always
Severity: minor
Priority: normal
Status: assigned
======================================================================
Date Submitted: 01-13-2006 06:01 PST
Last Modified: 01-13-2006 06:01 PST
======================================================================
Summary: tar fails to extract correctly 100 chars path files
Description:
When a file in a tar archive has a path of exactly 100 characters, the
busybox tar extracts it with a wrong name. It adds at the end of the file
name the file mode.
For example, with a file :
./home/grap/...fillmeto100chars....txt
It reads it like :
$ tar -tf myarchive.tar
./home/grap/...fillmeto100chars....txt0000644
and it does the same with a tar -xf.
The reason is that in a tar archive, when the path does exactly 100
characters, there is no '\0' character separating it from the mode. In
busybox, tar proceeds with a strdup so it takes the whole string to the
first '\0', wich explains that with a 100 chars path file it takes the
mode with the file name.
The following patch fixes this bug by first using a temporary string
obtained by a strndup(..., 100):
[url]http://opensource.synerway.com/patchs/busybox-1.01-100_chars_tar_bug_fix.patch[/url]
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
01-13-06 06:01 grap New Issue
01-13-06 06:01 grap Status new => assigned
01-13-06 06:01 grap Assigned To => BusyBox
======================================================================
More information about the busybox-cvs
mailing list