From: Eric Wong Date: Fri, 05 Aug 2016 23:38:38 GMT Subject: Re: [PATCH v2 5/5] convert: add filter..process option Message-ID: <20160805233838.GA29867@starla> In-Reply-To: <4499EF4B-974C-4D59-B95F-541EA4CF4078@gmail.com> > >>> larsxschneider@gmail.com wrote: > >>>> +static int apply_protocol_filter(const char *path, const char *src, size_t len, Lars Schneider wrote: > > On 05 Aug 2016, at 20:55, Eric Wong 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.