From: Junio C Hamano Date: Thu, 19 Jan 2023 23:58:33 GMT Subject: Re: [PATCH 7/6] fsck: do not assume NUL-termination of buffers Message-ID: In-Reply-To: Jeff King writes: > 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.