Some incorrect option sizes for PQconninfoOption in libpq - Mailing list pgsql-hackers

From Michael Paquier
Subject Some incorrect option sizes for PQconninfoOption in libpq
Date
Msg-id 20200128053633.GD1552@paquier.xyz
Whole thread Raw
Responses Re: Some incorrect option sizes for PQconninfoOption in libpq  (Daniel Gustafsson <daniel@yesql.se>)
List pgsql-hackers
Hi all,

I was reviewing the libpq code for the recent SSL protocol patch, and
noticed two mistakes with dispsize for the following parameters:
- channel_binding should be at 8, the largest value being "require".
- gssencmode should be at 8.

In those cases the zero-terminator was forgotten in the count.  A
similar mistake was done in the past for sslmode that was fixed by
f4051e36.  It is unlikely that dispsize is being used, but we cannot
break that on compatibility grounds, and the current numbers are
incorrect so let's fix it.

Thoughts?
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Should we add xid_current() or a int8->xid cast?
Next
From: Amit Kapila
Date:
Subject: Re: PATCH: logical_work_mem and logical streaming of largein-progress transactions