From: Robert A. <bob...@ed...> - 2007-11-28 19:24:43
|
On Wed, 2007-11-28 at 19:17 +0000, Robert Atkey wrote: > The unmodified Unzip is OK on the first one, but fails on the second. > The modified Unzip succeeds on both. I should add that the bug is that the Unzip module attempts to calculate the 16bit one's complement of a value by 0x10000 - x, where it should be 0xffff - x. Uncompressed blocks in the DEFLATE format are stored as: size of data (2 bytes, little endian) one's complement of size of data (2 bytes, little endian) the data... The unzip module checks the agreement between the two sizes incorrectly and throws an exception on valid data. Bob |