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

Re: [PATCH] Fix segmentation fault when user doesn't have access permission to the repository.

From
Alex Riesen <raa.lkml@gmail.com>
Date
Nov 22, 2007, 16:09 UTC
Message-ID
<20071122160959.GA3411@steel.home>
In-Reply-To
<b8bf37780711211659i4d621533o6a3b97349bb75f8c@mail.gmail.com>
André Goddard Rosa, Thu, Nov 22, 2007 01:59:00 +0100:
Show 9 quoted lines
> @@ -487,8 +490,13 @@ static int do_fetch(struct transport *transport,
>  		die("Don't know how to fetch from %s", transport->url);
>  
>  	/* if not appending, truncate FETCH_HEAD */
> -	if (!append)
> -		fclose(fopen(git_path("FETCH_HEAD"), "w"));
> +	if (!append) {
> +		char *filename = git_path("FETCH_HEAD");
> +		int fd = fopen(filename, "w");
This should have been "FILE *fp", not "int fd".
Show 10 quoted lines
> +		if (!fd)
> +			return error("cannot open %s: %s\n", filename, strerror(errno));
> +		fclose(fd);
> +	}
>  
>  	ref_map = get_ref_map(transport, refs, ref_count, tags, &autotags);
>  
> -- 
> 1.5.3.6.861.gd794-dirty
> 
Previous: André Goddard RosaNext: André Goddard Rosa
Message 2 of 10 in “Fix segmentation fault when user doesn't have access permission to the repository.”
  1. Fix segmentation fault when user doesn't have access permission to the repository.André Goddard Rosa, Nov 22, 2007
  2. Alex RiesenNov 22, 2007
  3. André Goddard RosaNov 22, 2007
  4. Fix segmentation fault when user doesn't have access permission to the repository.André Goddard Rosa, Nov 25, 2007
  5. Junio C HamanoNov 30, 2007
  6. fetch_refs_via_pack() discards status?Junio C Hamano, Dec 5, 2007
  7. Daniel BarkalowDec 5, 2007
  8. Junio C HamanoDec 5, 2007
  9. André Goddard RosaDec 6, 2007
  10. Daniel BarkalowDec 6, 2007

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.