Re: [PATCH v4 1/1] midx.c: fix an integer overflow
- From
- Damien Robert <damien.olivier.robert@gmail.com>
- Date
- Mar 28, 2020, 22:23 UTC
- Message-ID
- <20200328222342.jfxsk3gvujgqdt4f@doriath>
- In-Reply-To
- <xmqqbloiitnv.fsf@gitster.c.googlers.com>
From Junio C Hamano, Thu 26 Mar 2020 at 16:27:16 (-0700) :
> I think this is underflow & wraparound, but I'll let it pass ;-)
Ah thanks for the 'wraparound' term, I was missing it, so that's why I wrote overflow instead since everybody understand what I meant.
Mathematically I think of this as a truncating in the ring of 2-adic integers, but I did not want to write this in the commit message :)
> The patch looks good; will queue.
Thanks. I just sent a v5 with a microfix (which is not really important, so v5 can be dropped). Since pu is subject to be rewound anyway, I guess you prefer a new version rather than a patch on top of v4?
-- Damien Robert http://www.normalesup.org/~robert/pro