From: Junio C Hamano <gitster@pobox.com>
To: Augie Fackler <durin42@gmail.com>
Cc: Alex Riesen <raa.lkml@gmail.com>,
git@vger.kernel.org, Benjamin Kramer <benny.kra@googlemail.com>,
Jon Loeliger <jdl@jdl.com>
Subject: Re: [PATCH] Don't crash if ai_canonname comes back as null
Date: Wed, 29 Apr 2009 16:21:27 -0700 [thread overview]
Message-ID: <7v63gn59mw.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <C2AC0D7A-3E11-4A3A-8447-5D7582547B13@gmail.com> (Augie Fackler's message of "Wed, 29 Apr 2009 18:04:42 -0500")
Augie Fackler <durin42@gmail.com> writes:
> Fixes a weird bug where git-daemon was segfaulting
> when started by sh(1) because ai_canonname was null.
> ---
> Fixed based on feedback.
Hmm.
I've been waiting for feedback to a patch proposed earlier in the same
area, which is <49F5BA55.3060606@googlemail.com> ($gmane/117670). How
does this new one relate to it?
> daemon.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/daemon.c b/daemon.c
> index 13401f1..ae21d92 100644
> --- a/daemon.c
> +++ b/daemon.c
> @@ -459,7 +459,7 @@ static void parse_extra_args(char *extra_args, int
> buflen)
> inet_ntop(AF_INET, &sin_addr->sin_addr,
> addrbuf, sizeof(addrbuf));
> free(canon_hostname);
> - canon_hostname = xstrdup(ai->ai_canonname);
> + canon_hostname = ai->ai_canonname ?
> xstrdup(ai->ai_canonname) : NULL;
> free(ip_address);
> ip_address = xstrdup(addrbuf);
> break;
> --
> 1.6.2.GIT
next prev parent reply other threads:[~2009-04-29 23:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-29 21:48 [PATCH] Workaround for ai_canonname sometimes coming back as null Augie Fackler
2009-04-29 21:55 ` Alex Riesen
2009-04-29 21:56 ` Augie Fackler
2009-04-29 22:01 ` Alex Riesen
2009-04-29 22:04 ` Alex Riesen
2009-04-29 23:04 ` [PATCH] Don't crash if ai_canonname comes " Augie Fackler
2009-04-29 23:21 ` Junio C Hamano [this message]
2009-04-29 23:32 ` Augie Fackler
2009-04-30 14:13 ` Jon Loeliger
2009-04-30 16:57 ` Junio C Hamano
2009-04-29 21:56 ` [PATCH] Workaround for ai_canonname sometimes coming " Alex Riesen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7v63gn59mw.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=benny.kra@googlemail.com \
--cc=durin42@gmail.com \
--cc=git@vger.kernel.org \
--cc=jdl@jdl.com \
--cc=raa.lkml@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).