git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATH] fix segfault in fsck-cache

From
AGAndreas Gal <gal@uci.edu>
Date
Apr 24, 2005, 05:24 UTC
Message-ID
<Pine.LNX.4.58.0504232223570.8755@sam.ics.uci.edu>
In-Reply-To
<Pine.LNX.4.58.0504232202380.7195@sam.ics.uci.edu>

This isn't working right either, depending on your ZLIB version. Do not apply.

Andreas
On Sat, 23 Apr 2005, Andreas Gal wrote:
Show 26 quoted lines
> 
> 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 <gal@uci.edu>
> 
> --- 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
> 
Previous: Andreas GalNext: James Bottomley
Message 13 of 14 in “make file merging respect permissions”
  1. make file merging respect permissionsJames Bottomley, Apr 23, 2005
  2. Linus TorvaldsApr 23, 2005
  3. James BottomleyApr 23, 2005
  4. James BottomleyApr 23, 2005
  5. Petr BaudisApr 23, 2005
  6. James BottomleyApr 23, 2005
  7. James BottomleyApr 23, 2005
  8. Linus TorvaldsApr 24, 2005
  9. James BottomleyApr 24, 2005
  10. Linus TorvaldsApr 24, 2005
  11. James BottomleyApr 24, 2005
  12. [PATH] fix segfault in fsck-cacheAndreas Gal, Apr 24, 2005
  13. Andreas GalApr 24, 2005
  14. James BottomleyApr 24, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.