[BusyBox 0000717]: gunzip -t exits with wrong status

bugs at busybox.net bugs at busybox.net
Sat Sep 30 19:26:14 UTC 2006


The following issue has been CLOSED 
====================================================================== 
http://busybox.net/bugs/view.php?id=717 
====================================================================== 
Reported By:                sbeaver
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   717
Category:                   Other
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     closed
Resolution:                 open
Fixed in Version:           
====================================================================== 
Date Submitted:             02-10-2006 14:13 PST
Last Modified:              09-30-2006 12:26 PDT
====================================================================== 
Summary:                    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'
====================================================================== 

---------------------------------------------------------------------- 
 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... 

---------------------------------------------------------------------- 
 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. 

---------------------------------------------------------------------- 
 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  
======================================================================




More information about the busybox-cvs mailing list