Subject: Re: [PATCH] config.c: fix writing config files on Windows network shares

From: Jeff King <[email-masked]>
Date: Tue, 30 Jun 2015 12:01:25 -0400

On Tue, Jun 30, 2015 at 04:46:20PM +0200, Torsten Bögershausen wrote:

> The value of fstat() is not checked here:
> (indicated by a compiler warning, that contents_sz may be uninitalized.
> 
>  config.c:
>  int git_config_set_multivar_in_file(
>  //around line 2063 (the only call to fstat())
>  		fstat(in_fd, &st);
>  		contents_sz = xsize_t(st.st_size);

There is a similar case in git_config_rename_section_in_file. It looks
like they could both just jump to the error case when fstat() fails.

-Peff