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
0000717 [BusyBox] Other minor always 02-10-06 14:13 09-30-06 12:26
Reporter sbeaver View Status public  
Assigned To BusyBox
Priority normal Resolution unable to reproduce  
Status closed   Product Version 1.01
Summary 0000717: gunzip -t exits with wrong status
Description gunzip -t known_bad_compressed_file.gz

produces:

gunzip: Incorrect length
gunzip: crc error

on stderr but exits with a status of '0' (OK)
GNU gunzip exits with '1'
Additional Information
Attached Files

- Relationships

- Notes
(0001481)
landley
06-30-06 06:43

Sigh. The tar code is nasty and tangled, and seems like it would need an extensive rewrite to propagate back this error. Look at tar.c line 853:

        while (get_header_ptr(tar_handle) == EXIT_SUCCESS);

        /* Check that every file that should have been extracted was */
        while (tar_handle->accept) {

In this case, get_header_ptr should be a function pointer to get_header_tar_gz(), which returns either EXIT_SUCCESS or EXIT_FAILURE. EXIT_FAILURE means "couldn't extract a file". Could be end of file, could be an error, it doesn't distinguish.

I need to rewrite this to just fork off a copy of gzip for both read and write, but that's not happening in 1.2.0...
 
(0001482)
landley
06-30-06 06:48

Ah, hang on. You're talking about gunzip, not tar. My bad.

In my tests, gunzip is exiting with an error code in each case I've seen. Since you didn't actually attach a file reproducing this error, and I can't reproduce it here, and your report is about a really old version, there's not much more I can do.
 
(0001483)
landley
06-30-06 06:49

Cannot reproduce.
 

- Issue History
Date Modified Username Field Change
02-10-06 14:13 sbeaver New Issue
02-10-06 14:13 sbeaver Status new => assigned
02-10-06 14:13 sbeaver Assigned To  => BusyBox
06-30-06 06:43 landley Note Added: 0001481
06-30-06 06:48 landley Note Added: 0001482
06-30-06 06:49 landley Note Added: 0001483
06-30-06 06:49 landley Status assigned => feedback
09-30-06 12:26 vda Status feedback => closed
09-30-06 12:26 vda Resolution open => unable to reproduce


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker