Subject: Re: [PATCH 13/14] git-compat-util.h: fix integer overflow on IL32P64 systems

From: Marat Radchenko <[email-masked]>
Date: Thu, 9 Oct 2014 09:05:41 +0400

On Wed, Oct 08, 2014 at 01:02:10PM -0700, Junio C Hamano wrote:
> Junio C Hamano <[email-masked]> writes:
> 
> > Marat Radchenko <[email-masked]> writes:
> >
> >> Signed-off-by: Marat Radchenko <[email-masked]>
> >> ---
> >>  git-compat-util.h | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/git-compat-util.h b/git-compat-util.h
> >> index b338277..101c9d7 100644
> >> --- a/git-compat-util.h
> >> +++ b/git-compat-util.h
> >> @@ -474,7 +474,7 @@ extern int git_munmap(void *start, size_t length);
> >>  #endif
> >>  
> >>  #define DEFAULT_PACKED_GIT_LIMIT \
> >> -	((1024L * 1024L) * (sizeof(void*) >= 8 ? 8192 : 256))
> >> +	((size_t)(1024L * 1024L) * (sizeof(void*) >= 8 ? 8192 : 256))
> >
> > 1024 * 1024 * 8192 overflows 32-bit unsigned, but is size_t always
> > large enough?  Just checking.
> 
> Heh, I was being silly.  This gives the default value for a variable
> whose type is size_t, so it would better fit.  So please throw 13 in
> the list of changes I found sensible in the other message.

Is it an Acked-by?

-- 
-- 
*** Please reply-to-all at all times ***
*** (do not pretend to know who is subscribed and who is not) ***
*** Please avoid top-posting. ***
The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.

You received this message because you are subscribed to the Google
Groups "msysGit" group.
To post to this group, send email to [email-masked]
To unsubscribe from this group, send email to
[email-masked]
For more options, and view previous threads, visit this group at
http://groups.google.com/group/msysgit?hl=en_US?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Git for Windows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email-masked].
For more options, visit https://groups.google.com/d/optout.