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
0004644 [BusyBox] Other minor always 08-18-08 18:51 08-21-08 00:18
Reporter cristic View Status public  
Assigned To BusyBox
Priority normal Resolution fixed  
Status closed   Product Version svn
Summary 0004644: tar memory errors when called w/ incorrect arguments
Description Test cases:

$./tar tf_ /
tar: can't open �N�NOOO/O5OFOMO^OgOxO�O�O�O': No such file or directory

$ ./tar tfx /
tar: can't open ' ��x ��x �x �x �x /�x 5�x F�x M�x ^�x g�x x�x ��x ��x ��x ': No such file or directory

This should be rejected by tar, as in GNU tar:
$ tar tf_ /
tar: invalid option -- _
Try `tar --help' or `tar --usage' for more information.

tar tfx /
tar: You may not specify more than one `-Acdtrux' option
Try `tar --help' or `tar --usage' for more information.


The problem is that when getopt32 is called at tar.c:835, tar_filename
is set incorrectly, and later invalid memory is read from tar_filename, as
on line tar.c:931 (if (LONE_DASH(tar_filename)) ...)

Thanks,
Cristian
Additional Information
Attached Files

- Relationships

- Notes
(0010524)
vda
08-19-08 15:10

Does not happen to me on current svn.
 
(0010574)
cristic
08-20-08 23:45

Yes, it looks like this got fixed by the recent changes
to the code, most likely the ones to getopt32. I think
it's fine to close it now.
 
(0010584)
bernhardf
08-21-08 00:18

fixed in 1.12.x. Thanks alot for the report!
 

- Issue History
Date Modified Username Field Change
08-18-08 18:51 cristic New Issue
08-18-08 18:51 cristic Status new => assigned
08-18-08 18:51 cristic Assigned To  => BusyBox
08-19-08 15:10 vda Note Added: 0010524
08-20-08 23:45 cristic Note Added: 0010574
08-21-08 00:18 bernhardf Status assigned => closed
08-21-08 00:18 bernhardf Note Added: 0010584
08-21-08 00:18 bernhardf Resolution open => fixed


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker