Re: pgsql: Fix parsing of integer values for connection parametersin libpq - Mailing list pgsql-committers

From Michael Paquier
Subject Re: pgsql: Fix parsing of integer values for connection parametersin libpq
Date
Msg-id 20191023023652.GB3286@paquier.xyz
Whole thread Raw
In response to Re: pgsql: Fix parsing of integer values for connection parametersin libpq  (Michael Paquier <michael@paquier.xyz>)
List pgsql-committers
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, and fixed it, with an extra
assertion making sure that we never call it with a NULL input.  All
callers of parse_int_param are careful to not call the routine with a
NULL input, but future callers may not be that careful...
--
Michael

Attachment

pgsql-committers by date:

Previous
From: Michael Paquier
Date:
Subject: pgsql: Fix thinkos from 4f4061b for libpq integer parsing
Next
From: Michael Paquier
Date:
Subject: pgsql: Remove last traces of --adduser/--no-adduser in createuser