diff options
author | Noah Misch <noah@leadboat.com> | 2018-04-25 18:50:29 -0700 |
---|---|---|
committer | Noah Misch <noah@leadboat.com> | 2018-04-25 18:50:32 -0700 |
commit | c7cc9b7d408063c04482efb6bdd3c822fc3455ce (patch) | |
tree | 31e8be235b560b12fc45359abe585694032402ca /src | |
parent | 1222db999dc8ad055e0320dd6704d814acca3b51 (diff) |
Correct pg_recvlogical server version test.
The predecessor test boiled down to "PQserverVersion(NULL) >= 100000",
which is always false. No release includes that, so it could not have
reintroduced CVE-2018-1058. Back-patch to 9.4, like the addition of the
predecessor in commit 8d2814f274def85f39fbe997d454b01628cb5667.
Discussion: https://postgr.es/m/20180422215551.GB2676194@rfd.leadboat.com
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/pg_basebackup/streamutil.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/pg_basebackup/streamutil.c b/src/bin/pg_basebackup/streamutil.c index 42e0cb10821..7b60a070765 100644 --- a/src/bin/pg_basebackup/streamutil.c +++ b/src/bin/pg_basebackup/streamutil.c @@ -212,7 +212,7 @@ GetConnection(void) * 10, so the search path cannot be changed (by us or attackers) on * earlier versions. */ - if (dbname != NULL && PQserverVersion(conn) >= 100000) + if (dbname != NULL && PQserverVersion(tmpconn) >= 100000) { PGresult *res; |