Re: [PATCH] diff-no-index: fix stdin path in subdirectory
- From
- opensource@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.