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

[PATCH 0/2] Fix crashes due to real_pathdup() potentially returning NULL

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Mar 8, 2017, 15:43 UTC
Message-ID
<cover.1488987786.git.johannes.schindelin@gmx.de>

This problem was identified as the root cause for what seemed to be a path conversion problem in the MSYS2 runtime at first glance.

Original bug report: http://public-inbox.org/git/CAFKRc7y_kpCGNORENUZ2qw_4qBwjjyaaDFxAEQa52fTryj+w7A@mail.gmail.com/

We may want to consider fast-tracking this into v2.12.1, and to that end, I would appreciate code reviews that focus on the correctness of this patch and that try to consider undesired side effects.

Johannes Schindelin (2):
  Demonstrate NULL pointer access with invalid GIT_WORK_TREE
  Fix callsites of real_pathdup() that wanted it to die on error
 abspath.c            |  4 ++--
 builtin/init-db.c    |  6 +++---
 cache.h              |  2 +-
 dir.c                |  4 ++--
 environment.c        |  2 +-
 setup.c              |  4 ++--
 submodule.c          | 10 +++++-----
 t/t1501-work-tree.sh |  8 ++++++++
 worktree.c           |  2 +-
 9 files changed, 25 insertions(+), 17 deletions(-)
base-commit: e0688e9b28f2c5ff711460ee8b62077be5df2360
Published-As: https://github.com/dscho/git/releases/tag/real_pathdup-callers-v1
Fetch-It-Via: git fetch https://github.com/dscho/git real_pathdup-callers-v1
-- 
2.12.0.windows.1.7.g94dafc3b124
Next: Johannes Schindelin
Message 1 of 10 in “Fix crashes due to real_pathdup() potentially returning NULL”
  1. 0/2 Fix crashes due to real_pathdup() potentially returning NULLJohannes Schindelin, Mar 8, 2017
  2. 2/2 Fix callsites of real_pathdup() that wanted it to die on errorJohannes Schindelin, Mar 8, 2017
  3. René ScharfeMar 8, 2017
  4. Brandon WilliamsMar 8, 2017
  5. Junio C HamanoMar 8, 2017
  6. Johannes SchindelinMar 9, 2017
  7. René ScharfeMar 9, 2017
  8. 1/2 Demonstrate NULL pointer access with invalid GIT_WORK_TREEJohannes Schindelin, Mar 8, 2017
  9. Jeff KingMar 8, 2017
  10. Johannes SchindelinMar 9, 2017

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.