Re: [PATCH 3/5] config: set errno in numeric git_parse_* functions

2013-09-09 Thread Jeff King
On Sun, Sep 08, 2013 at 08:36:35PM -0400, Eric Sunshine wrote: > On Sun, Sep 8, 2013 at 4:36 AM, Jeff King wrote: > > When we are parsing an integer or unsigned long, we use > > the strto*max functions, which properly set errno to ERANGE > > if we get a large value. However, we also do further ra

Re: [PATCH 3/5] config: set errno in numeric git_parse_* functions

2013-09-08 Thread Eric Sunshine
On Sun, Sep 8, 2013 at 4:36 AM, Jeff King wrote: > When we are parsing an integer or unsigned long, we use > the strto*max functions, which properly set errno to ERANGE > if we get a large value. However, we also do further range > checks after applying our multiplication factor, but do not > set

[PATCH 3/5] config: set errno in numeric git_parse_* functions

2013-09-08 Thread Jeff King
When we are parsing an integer or unsigned long, we use the strto*max functions, which properly set errno to ERANGE if we get a large value. However, we also do further range checks after applying our multiplication factor, but do not set ERANGE. This means that a caller cannot tell if an error was