Re: [PATCH 11/15] midx: use 64-bit multiplication for chunk sizes
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Dec 8, 2020, 18:43 UTC
- Message-ID
- <X8/JXfTlbhuhgizF@nand.local>
- In-Reply-To
- <xmqqa6uuh7n1.fsf@gitster.c.googlers.com>
On Thu, Dec 03, 2020 at 02:00:50PM -0800, Junio C Hamano wrote:
Show 11 quoted lines
> "Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com> writes: > > > From: Derrick Stolee <dstolee@microsoft.com> > > > > When calculating the sizes of certain chunks, we should use 64-bit > > multiplication always. This allows us to properly predict the chunk > > sizes without risk of overflow. > > That's quite an obvious fix, applicable even before this entire > series. I think we saw quite similar bugfixes in different parts of > the codebase recently.
:-). Indeed, Stolee and I were probably looking at output from the same static analysis tool, which seems to be eager to catch these sorts of multiplication-widening errors.
I'd be happy to see this patch get applied down regardless of what happens with the rest of the series.
Thanks, Taylor