[BusyBox 0000640]: tar fails to extract correctly 100 chars path files

bugs at busybox.net bugs at busybox.net
Mon Feb 20 19:29:14 UTC 2006


The following issue has been CLOSED 
====================================================================== 
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:                     closed
Resolution:                 open
Fixed in Version:           
====================================================================== 
Date Submitted:             01-13-2006 06:01 PST
Last Modified:              02-20-2006 11:29 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]

====================================================================== 

---------------------------------------------------------------------- 
 grap - 01-13-06 06:15  
---------------------------------------------------------------------- 
Let's retype the patch url:
http://opensource.synerway.com/patchs/busybox-1.01-100_chars_tar_bug_fix.patch 

---------------------------------------------------------------------- 
 landley - 02-20-06 11:29  
---------------------------------------------------------------------- 
svn 14150 

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         
01-13-06 06:10  grap           Issue Monitored: grap                        
01-13-06 06:15  grap           Note Added: 0000931                          
02-20-06 11:29  landley        Status                   assigned => closed  
02-20-06 11:29  landley        Note Added: 0001125                          
======================================================================




More information about the busybox-cvs mailing list