Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2930c05

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 parent5d6899d commit2930c05

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)

[8]ページ先頭

©2009-2025 Movatter.jp