BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000640 [BusyBox] Other minor always 01-13-06 06:01 02-20-06 11:29
Reporter grap View Status public  
Assigned To BusyBox
Priority normal Resolution fixed  
Status closed   Product Version 1.01
Summary 0000640: 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] [^]
Additional Information
Attached Files

- Relationships

- Notes
(0000931)
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 [^]
 
(0001125)
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
02-20-06 11:29 landley Resolution open => fixed


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker