Re: [PATCH 7/6] fsck: do not assume NUL-termination of buffers
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 19, 2023, 23:58 UTC
- Message-ID
- <xmqq358613h2.fsf@gitster.g>
- In-Reply-To
- <Y8nOmZHv7T843uBn@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 12 quoted lines
> So here's the result of my digging on this. The good news is that this > one commit on top of the rest of the series should make everything safe. > I'm sorry the explanation is a bit long, but I wanted to capture a bit > of the history, the subtle assumptions, and how I approached analyzing > and fixing it. > > There are a few paths forward here: > > - apply this on top of the earlier 6 patches. This is the simplest > thing, and my preference. It does mean that t3800 temporarily has a > read-one-char-past-buffer bug that is detected by ASan after patch 6 > but before this patch is applied.
That sounds reasonable, even though purist among us may find it slightly disturbing that it breaks "bisectability".
> Anyway, here's the patch. I'm happy to repost the whole 7-patch series, > too, but since the earlier ones didn't change in my preferred path > forward, this seemed easier for now. ;)
Thanks. Will queue.