Re: [PATCH] Fix delta integer overflows

2017-08-08 Thread Johannes Schindelin
Hi Martin, On Tue, 8 Aug 2017, Martin Koegler wrote: > On Mon, Aug 07, 2017 at 09:39:12PM +0200, Johannes Schindelin wrote: > > If you want to work on data in memory, then size_t is the appropriate data > > type. We already use it elsewhere. Let's use it here, too, without the > > intermediate

Re: [PATCH] Fix delta integer overflows

2017-08-08 Thread Martin Koegler
On Mon, Aug 07, 2017 at 06:44:16PM -0700, Junio C Hamano wrote: > Having said that, I am a bit curious how you came to this patch. > Was the issue found by code inspection, or did you actually have a > real life use case to raise the core.bigFileThreshold configuration > to a value above 4GB?

Re: [PATCH] Fix delta integer overflows

2017-08-08 Thread Martin Koegler
On Mon, Aug 07, 2017 at 09:39:12PM +0200, Johannes Schindelin wrote: > If you want to work on data in memory, then size_t is the appropriate data > type. We already use it elsewhere. Let's use it here, too, without the > intermediate bump from the incorrect `int` to the equally incorrect > `long`.

Re: [PATCH] Fix delta integer overflows

2017-08-07 Thread Junio C Hamano
Junio C Hamano writes: > Martin Koegler writes: > >> From: Martin Koegler >> >> The current delta code produces incorrect pack objects for files > 4GB. >> >> Signed-off-by: Martin Koegler >> ---

Re: [PATCH] Fix delta integer overflows

2017-08-07 Thread Junio C Hamano
Junio C Hamano writes: > This is not about where the bar is set. It is about expectation After having thought about this a bit more, I think in the message I am responding to I mischaracterised the aspect of a patch that influences the "expectation". It is much less

Re: [PATCH] Fix delta integer overflows

2017-08-07 Thread Junio C Hamano
Johannes Schindelin writes: > So are you saying that starting with v2.14.0, you accept patches into `pu` > for which you would previously have required multiple iterations before > even considering it for `pu`? > > Frankly, I am a bit surprised that this obvious

Re: [PATCH] Fix delta integer overflows

2017-08-07 Thread Johannes Schindelin
Hi Junio, On Mon, 7 Aug 2017, Junio C Hamano wrote: > Johannes Schindelin writes: > > >> The patch obviously makes the code better and self consistent in > >> that "struct delta_index" has src_size as ulong, and this function > >> takes trg_size as ulong, and it was

Re: [PATCH] Fix delta integer overflows

2017-08-07 Thread Junio C Hamano
Johannes Schindelin writes: >> The patch obviously makes the code better and self consistent in >> that "struct delta_index" has src_size as ulong, and this function >> takes trg_size as ulong, and it was plain wrong for the code to >> assume that "i", which is uint,

Re: [PATCH] Fix delta integer overflows

2017-08-07 Thread Johannes Schindelin
Hi, On Mon, 7 Aug 2017, Junio C Hamano wrote: > Martin Koegler writes: > > > From: Martin Koegler > > > > The current delta code produces incorrect pack objects for files > 4GB. > > > > Signed-off-by: Martin Koegler

Re: [PATCH] Fix delta integer overflows

2017-08-07 Thread Junio C Hamano
Martin Koegler writes: > From: Martin Koegler > > The current delta code produces incorrect pack objects for files > 4GB. > > Signed-off-by: Martin Koegler > --- > diff-delta.c | 23 --- > 1 file