Re: pgsql: Fix parsing of integer values for connection parameters in libpq

2019-10-22 Thread Michael Paquier
On Tue, Oct 22, 2019 at 07:05:53PM +0900, Michael Paquier wrote: > Yes, it looks like a brain fade here. Conversion failures are tracked > before that, so strtol() would not return NULL for endptr. The first > part could just be removed as per the attached. I looked at that with a fresher mind,

Re: pgsql: Fix parsing of integer values for connection parameters in libpq

2019-10-22 Thread Michael Paquier
On Tue, Oct 22, 2019 at 10:05:45AM +0200, Peter Eisentraut wrote: > You probably want something like > > if (end && *end != ...) Yes, it looks like a brain fade here. Conversion failures are tracked before that, so strtol() would not return NULL for endptr. The first part could just be remo

Re: pgsql: Fix parsing of integer values for connection parameters in libpq

2019-10-22 Thread Peter Eisentraut
On 2019-10-21 04:18, Michael Paquier wrote: > Fix parsing of integer values for connection parameters in libpq Something in this code doesn't make sense: + /* +* Skip any trailing whitespace; if anything but whitespace remains before +* the terminating character, fail +*/ + while