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

Re: [PATCH] diff-no-index: fix stdin path in subdirectory

From
Oopensource@gregoirege.is <opensource@gregoirege.is>
Date
Aug 9, 2025, 02:12 UTC
Message-ID
<7E0AF030-2C14-4121-A2AE-A419B46EA701@gregoirege.is>
In-Reply-To
<xmqqjz3diymi.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> wrote:
> Ah, what I meant was that I did not test the patch, so I did not
> know if it solves the problem you observed in your environment and
> with your development tools, hence I was asking you to apply it and
> test, like you did when you originally noticed the problem ;-)

Ah, I definitely should have been more explicit, sorry. I did test your patch, and it did work where git previously encountered a buffer overflow.

I didn't try a lot of inputs, but different combinations of `-`, `/dev/null` and files in parent / subdirectories yield the same outputs as before, and additionally don't trigger any buffer overflow with ASAN.

`prove --shuffle -j8 t*-diff*.sh` also succeeded with your patch, whereas `t4053-diff-no-index.sh` fails on current `master`. I did skip `t4056-diff-order.sh` as it never terminates on my computer both with and without your patch.

Previous: Junio C Hamano
Message 5 of 5 in “diff-no-index: fix stdin path in subdirectory”
  1. diff-no-index: fix stdin path in subdirectoryGregoire Geis, Aug 7, 2025
  2. Junio C HamanoAug 7, 2025
  3. opensource@gregoirege.isAug 8, 2025
  4. Junio C HamanoAug 8, 2025
  5. opensource@gregoirege.isAug 9, 2025

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.