Anonymous | Login | Signup for a new account | 11-10-2008 11:09 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0001146 | [BusyBox] Other | major | always | 01-08-07 14:47 | 01-10-07 12:51 | ||||
Reporter | espakman | View Status | public | ||||||
Assigned To | BusyBox | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | svn | ||||||
Summary | 0001146: gunzip broken in SVN | ||||||||
Description |
In the current SVN version of busybox, gunzip is broken. Testcase: # ./busybox gunzip uClibc-0.9.28.tar.gz gunzip: crc error gunzip: error inflating |
||||||||
Additional Information | |||||||||
Attached Files | |||||||||
|
Notes | |
(0001976) vda 01-09-07 15:58 |
Just compiled svn, and: # wget http://debian.csail.mit.edu/pub/linux/libs/uclibc/uClibc-0.9.28.tar.gz [^] Connecting to debian.csail.mit.edu[128.30.2.36]:80 uClibc-0.9.28.tar.gz 100% |************************************| 2352 KB 00:00:00 ETA # ./busybox gunzip uClibc-0.9.28.tar.gz Please give URL to uClibc-0.9.28.tar.gz you use for testing and attach your config. |
(0001982) rockeychu 01-10-07 06:41 |
Indeed, since revision 17168, gunzip is broken by uninitialized variables of "n" and "d". (Only first 32kB data is OK, that is, any file size <=32kB is OK). The following patch solves this BUG: Index: archival/libunarchive/decompress_unzip.c =================================================================== --- archival/libunarchive/decompress_unzip.c (revision 17224) +++ archival/libunarchive/decompress_unzip.c (working copy) @@ -479,6 +479,7 @@ { unsigned e; /* table entry flag/number of extra bits */ huft_t *t; /* pointer to table entry */ + static unsigned n, d; /* length and index for copy */ if (resume_copy) goto do_copy; @@ -510,10 +511,6 @@ return 1; // We have a block to read } } else { /* it's an EOB or a length */ - /* length and index for copy */ - unsigned n = n; /* for gcc */ - unsigned d = d; /* for gcc */ - /* exit if end of block */ if (e == 15) { break; |
(0001983) vda 01-10-07 12:51 |
fixed in 17230, thanks you for excellent debug work guys! |
Copyright © 2000 - 2006 Mantis Group |