diff options
author | Michael Paquier <michael@paquier.xyz> | 2020-01-29 15:08:26 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2020-01-29 15:08:26 +0900 |
commit | b558f6da61c47b2be270dfbeed210c418601be82 (patch) | |
tree | 8b9a26230d877b65f5ce88c8b0e967ae7c06eafc /src | |
parent | 87fed2a197abc1397b63ee74b3fa7eb20471fff5 (diff) | |
download | postgresql-b558f6da61c47b2be270dfbeed210c418601be82.tar.gz postgresql-b558f6da61c47b2be270dfbeed210c418601be82.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/interfaces/libpq/fe-connect.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c index e6635136df6..7b0fb0ea9dc 100644 --- a/src/interfaces/libpq/fe-connect.c +++ b/src/interfaces/libpq/fe-connect.c @@ -313,7 +313,7 @@ static const internalPQconninfoOption PQconninfoOptions[] = { * support. */ {"gssencmode", "PGGSSENCMODE", DefaultGSSMode, NULL, - "GSSENC-Mode", "", 7, /* sizeof("disable") == 7 */ + "GSSENC-Mode", "", 8, /* sizeof("disable") == 8 */ offsetof(struct pg_conn, gssencmode)}, /* Kerberos and GSSAPI authentication support specifying the service name */ @@ -322,7 +322,7 @@ static const internalPQconninfoOption PQconninfoOptions[] = { offsetof(struct pg_conn, krbsrvname)}, {"gsslib", "PGGSSLIB", NULL, NULL, - "GSS-library", "", 7, /* sizeof("gssapi") = 7 */ + "GSS-library", "", 7, /* sizeof("gssapi") == 7 */ offsetof(struct pg_conn, gsslib)}, {"replication", NULL, NULL, NULL, |