Skip to content

Commit 29e321c

Browse files
committed
Fix dispsize for libpq connection parameters channel_binding and gssencmode
channel_binding's longest allowed value is not "7", it is actually "8". gssencmode also got that wrong. A similar mistake has been fixed as of f4051e3. Backpatch down to v12, where gssencmode has been introduced. Reviewed-by: Daniel Gustafsson Discussion: https://postgr.es/m/20200128053633.GD1552@paquier.xyz Backpatch-through: 12
1 parent 47bc9ce commit 29e321c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/interfaces/libpq/fe-connect.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ static const internalPQconninfoOption PQconninfoOptions[] = {
215215
offsetof(struct pg_conn, pgpassfile)},
216216

217217
{"channel_binding", "PGCHANNELBINDING", NULL, NULL,
218-
"Channel-Binding", "", 7, /* sizeof("require") */
218+
"Channel-Binding", "", 8, /* sizeof("require") == 8 */
219219
offsetof(struct pg_conn, channel_binding)},
220220

221221
{"connect_timeout", "PGCONNECT_TIMEOUT", NULL, NULL,
@@ -333,7 +333,7 @@ static const internalPQconninfoOption PQconninfoOptions[] = {
333333
* support.
334334
*/
335335
{"gssencmode", "PGGSSENCMODE", DefaultGSSMode, NULL,
336-
"GSSENC-Mode", "", 7, /* sizeof("disable") == 7 */
336+
"GSSENC-Mode", "", 8, /* sizeof("disable") == 8 */
337337
offsetof(struct pg_conn, gssencmode)},
338338

339339
/* Kerberos and GSSAPI authentication support specifying the service name */
@@ -342,7 +342,7 @@ static const internalPQconninfoOption PQconninfoOptions[] = {
342342
offsetof(struct pg_conn, krbsrvname)},
343343

344344
{"gsslib", "PGGSSLIB", NULL, NULL,
345-
"GSS-library", "", 7, /* sizeof("gssapi") = 7 */
345+
"GSS-library", "", 7, /* sizeof("gssapi") == 7 */
346346
offsetof(struct pg_conn, gsslib)},
347347

348348
{"replication", NULL, NULL, NULL,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy