From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: "brian m. carlson" <sandals@crustytoothpaste.net>
Cc: Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org
Subject: Re: [PATCH] var: avoid a segmentation fault when `HOME` is unset
Date: Tue, 5 Sep 2023 12:58:05 +0200 (CEST) [thread overview]
Message-ID: <d43d0b9d-6e97-94e6-2843-e6025142f963@gmx.de> (raw)
In-Reply-To: <ZPY9j0XDt/VVMnhG@tapette.crustytoothpaste.net>
Hi brian,
On Mon, 4 Sep 2023, brian m. carlson wrote:
> On 2023-09-04 at 06:21:26, Johannes Schindelin via GitGitGadget wrote:
> > From: Johannes Schindelin <johannes.schindelin@gmx.de>
> >
> > The code introduced in 576a37fccbf (var: add attributes files locations,
> > 2023-06-27) paid careful attention to use `xstrdup()` for pointers known
> > never to be `NULL`, and `xstrdup_or_null()` otherwise.
> >
> > One spot was missed, though: `git_attr_global_file()` can return `NULL`,
> > when the `HOME` variable is not set (and neither `XDG_CONFIG_HOME`), a
> > scenario not too uncommon in certain server scenarios.
> >
> > Fix this, and add a test case to avoid future regressions.
>
> Looks good to me.
Thank you for the review.
Ciao,
Johannes
prev parent reply other threads:[~2023-09-05 16:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-04 6:21 [PATCH] var: avoid a segmentation fault when `HOME` is unset Johannes Schindelin via GitGitGadget
2023-09-04 20:26 ` brian m. carlson
2023-09-05 10:58 ` Johannes Schindelin [this message]
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=d43d0b9d-6e97-94e6-2843-e6025142f963@gmx.de \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=sandals@crustytoothpaste.net \
/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