summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNoah Misch <noah@leadboat.com>2018-04-25 18:50:29 -0700
committerNoah Misch <noah@leadboat.com>2018-04-25 18:50:29 -0700
commit6336b6dfc5c5f7ef746fb7b14c720ef0c2c6a1f1 (patch)
treec0e3e4275d34e42e014cbc3c5a7e72d8c4ff6c34 /src
parent5602265f770f400a03b4a4ca22b3cd530c294bc2 (diff)
downloadpostgresql-6336b6dfc5c5f7ef746fb7b14c720ef0c2c6a1f1.tar.gz
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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/pg_basebackup/streamutil.c b/src/bin/pg_basebackup/streamutil.c
index 4fd536931b..77ae91fbe7 100644
--- a/src/bin/pg_basebackup/streamutil.c
+++ b/src/bin/pg_basebackup/streamutil.c
@@ -223,7 +223,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;