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

Re: [PATCH] Fix errno usage in connect.c

From
Junio C Hamano <junkio@cox.net>
Date
Jul 2, 2006, 00:09 UTC
Message-ID
<7vd5codfzn.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20060701215626.GB29115@pasky.or.cz>
Petr Baudis <pasky@suse.cz> writes:
Show 14 quoted lines
> Dear diary, on Wed, Jun 28, 2006 at 06:56:12PM CEST, I got a letter
> where Morten Welinder <mwelinder@gmail.com> said that...
>> It looks like connect.c waits too long before it uses errno in both copies
>> of git_tcp_connect_sock.  Both close and freeaddrinfo can poke any
>> non-zero value in there.
>
> Nice catch.
>
> ->8-
>
> errno was used after it could've been modified by a subsequent library call.
> Spotted by Morten Welinder.
>
> Signed-off-by: Petr Baudis <pasky@suse.cz>
Thanks.
Previous: Petr Baudis
Message 3 of 3 in “connect.c and errno”
  1. Morten WelinderJun 28, 2006
  2. Fix errno usage in connect.cPetr Baudis, Jul 1, 2006
  3. Junio C HamanoJul 2, 2006

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.