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

bugs at busybox.net bugs at busybox.net
Fri Jun 30 13:43:14 UTC 2006


A NOTE has been added to this issue. 
====================================================================== 
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:                     assigned
====================================================================== 
Date Submitted:             02-10-2006 14:13 PST
Last Modified:              06-30-2006 06:43 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... 

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




More information about the busybox-cvs mailing list