Skip to content

Commit b558f6d

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 87fed2a commit b558f6d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/interfaces/libpq/fe-connect.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ static const internalPQconninfoOption PQconninfoOptions[] = {
313313
* support.
314314
*/
315315
{"gssencmode", "PGGSSENCMODE", DefaultGSSMode, NULL,
316-
"GSSENC-Mode", "", 7, /* sizeof("disable") == 7 */
316+
"GSSENC-Mode", "", 8, /* sizeof("disable") == 8 */
317317
offsetof(struct pg_conn, gssencmode)},
318318

319319
/* Kerberos and GSSAPI authentication support specifying the service name */
@@ -322,7 +322,7 @@ static const internalPQconninfoOption PQconninfoOptions[] = {
322322
offsetof(struct pg_conn, krbsrvname)},
323323

324324
{"gsslib", "PGGSSLIB", NULL, NULL,
325-
"GSS-library", "", 7, /* sizeof("gssapi") = 7 */
325+
"GSS-library", "", 7, /* sizeof("gssapi") == 7 */
326326
offsetof(struct pg_conn, gsslib)},
327327

328328
{"replication", NULL, NULL, NULL,

0 commit comments

Comments
 (0)