Re: pgsql: Fix parsing of integer values for connection parametersin libpq

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: pgsql: Fix parsing of integer values for connection parametersin libpq
Дата
Msg-id 20191023023652.GB3286@paquier.xyz
обсуждение исходный текст
Ответ на Re: pgsql: Fix parsing of integer values for connection parametersin libpq  (Michael Paquier <michael@paquier.xyz>)
Список 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

Вложения

В списке pgsql-committers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: pgsql: Fix thinkos from 4f4061b for libpq integer parsing
Следующее
От: Michael Paquier
Дата:
Сообщение: pgsql: Remove last traces of --adduser/--no-adduser in createuser