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

Re: [PATCH] var: avoid a segmentation fault when `HOME` is unset

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Sep 5, 2023, 10:58 UTC
Message-ID
<d43d0b9d-6e97-94e6-2843-e6025142f963@gmx.de>
In-Reply-To
<ZPY9j0XDt/VVMnhG@tapette.crustytoothpaste.net>
Hi brian,
On Mon, 4 Sep 2023, brian m. carlson wrote:
Show 14 quoted lines
> 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

Previous: brian m. carlson
Message 3 of 3 in “var: avoid a segmentation fault when `HOME` is unset”
  1. var: avoid a segmentation fault when `HOME` is unsetJohannes Schindelin via GitGitGadget, Sep 4, 2023
  2. brian m. carlsonSep 4, 2023
  3. Johannes SchindelinSep 5, 2023

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.