Content-Length: 258568 | pFad | https://github.com/postgrespro/postgres_cluster/commit/2930c05634bcb7491bc443a493405e927ed08443

1F Don't pass NULL to fprintf, if a bogus connection string is given to … · postgrespro/postgres_cluster@2930c05 · GitHub
Skip to content

Commit 2930c05

Browse files
committed
Don't pass NULL to fprintf, if a bogus connection string is given to pg_dump.
Back-patch to all supported branches.
1 parent 5d6899d commit 2930c05

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/bin/pg_dump/pg_backup_db.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,8 @@ ConnectDatabase(Archive *AHX,
300300
/* check to see that the backend connection was successfully made */
301301
if (PQstatus(AH->connection) == CONNECTION_BAD)
302302
exit_horribly(modulename, "connection to database \"%s\" failed: %s",
303-
PQdb(AH->connection), PQerrorMessage(AH->connection));
303+
PQdb(AH->connection) ? PQdb(AH->connection) : "",
304+
PQerrorMessage(AH->connection));
304305

305306
/* check for version mismatch */
306307
_check_database_version(AH);

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/postgrespro/postgres_cluster/commit/2930c05634bcb7491bc443a493405e927ed08443

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy