From: Andreas Gal Date: Sun, 24 Apr 2005 05:24:29 GMT Subject: Re: [PATH] fix segfault in fsck-cache Message-ID: In-Reply-To: This isn't working right either, depending on your ZLIB version. Do not apply. Andreas On Sat, 23 Apr 2005, Andreas Gal wrote: > > I somehow got some corrupted object files in my repository that zlib > refuses to decompress. This patch makes sure we abort early before the > memcpy a few lines downtream segfaults (due to total_out == 0). > > Andreas > > Signed-off-by: Andreas Gal > > --- 66308ede85c2dad6b184fb74a7215b06a173d8f7/sha1_file.c > +++ sha1_file.c > @@ -155,6 +155,8 @@ > > inflateInit(&stream); > ret = inflate(&stream, 0); > + if (ret != Z_OK) > + return NULL; > if (sscanf(buffer, "%10s %lu", type, size) != 2) > return NULL; > > > - > To unsubscribe from this list: send the line "unsubscribe git" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >