From: Linus Torvalds Date: Thu, 08 Jan 2009 03:06:42 GMT Subject: Re: Public repro case! Re: [PATCH/RFC] Allow writing loose objects that are corrupted in a pack file Message-ID: In-Reply-To: <20090108030115.GF10790@spearce.org> On Wed, 7 Jan 2009, Shawn O. Pearce wrote: > > Ok, well, in this case I've been able to reproduce a zlib inflate > failure on the base object in a 2 deep delta chain. We got back: > > #define Z_STREAM_ERROR (-2) > > this causes the buffer to be freed and NULL to come back out of > unpack_compressed_entry(), and then everything is corrupt... I bet you actually got an earlier error already from the inflateInit. The Z_STREAM_ERROR probably comes from inflate() itself - and could very easily be due to a allocation error in inflateInit leaving the stream data incomplete. Let me try wrapping that dang thing and send a patch. Linus