Skip to content

Commit 32c2476

Browse files
committed
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 8d2814f. Discussion: https://postgr.es/m/20180422215551.GB2676194@rfd.leadboat.com
1 parent c76d0ee commit 32c2476

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bin/pg_basebackup/streamutil.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ GetConnection(void)
215215
* 10, so the search path cannot be changed (by us or attackers) on
216216
* earlier versions.
217217
*/
218-
if (dbname != NULL && PQserverVersion(conn) >= 100000)
218+
if (dbname != NULL && PQserverVersion(tmpconn) >= 100000)
219219
{
220220
PGresult *res;
221221

0 commit comments

Comments
 (0)