bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug in gunzip 1.2.4


From: Andy Jewell
Subject: bug in gunzip 1.2.4
Date: Fri, 16 Mar 2001 13:14:57 -0500

Subtle, but undeniable.

The bug occurs only when multiple gzip files are concatenated.

If a file (other than the first) starts at a byte offset that is a multiple of 32K, gunzip stops, thinking it's done, when in fact it isn't.

In gzip.c, at line 677 is the code

   if (!decompress || last_member || inptr == insize) break;
   /* end of file */

The trouble is with the 'inptr == insize'. The problem is, this is true if the last file exactly filled the input buffer (it's supposed to only be true at EOF, I'm guessing).

I've modified my own code, that generates the gzip file, to vary the size of the header so that this case never occurs.

WinZip, MacGZip, Stuffit 6.0 and Solaris gzip 1.3 all work correctly. Only straight up 1.2.4 has the problem.

Andy Jewell



reply via email to

[Prev in Thread] Current Thread [Next in Thread]