Subject: Re: [PATCH v2 5/5] convert: add filter.<driver>.process option

From: Eric Wong <[email-masked]>
Date: Fri, 5 Aug 2016 23:38:38 +0000

> >>> [email-masked] wrote:
> >>>> +static int apply_protocol_filter(const char *path, const char *src, size_t len,

Lars Schneider <[email-masked]> wrote:
> > On 05 Aug 2016, at 20:55, Eric Wong <[email-masked]> wrote:
> > Perhaps using xsize_t in git-compat-util.h works for now:
> > 
> > 	len = xsize_t(file_stat.st_size);
> 
> Thanks for the hint! Should I add the same check to sha1_file's use
> of fstat in line 1002 or is it not needed there?
> 
> https://github.com/git/git/blob/c6b0597e9ac7277e148e2fd4d7615ac6e0bfb661/sha1_file.c#L1002

Not needed, if you look at the definition of "struct packed_git"
in cache.h, you'll see pack_size is already off_t, not size_t
like `len` is.