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

Commitfeae7c3

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 parent04d7fa5 commitfeae7c3

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
@@ -305,7 +305,8 @@ ConnectDatabase(Archive *AHX,
305305
/* check to see that the backend connection was successfully made */
306306
if (PQstatus(AH->connection)==CONNECTION_BAD)
307307
die_horribly(AH,modulename,"connection to database \"%s\" failed: %s",
308-
PQdb(AH->connection),PQerrorMessage(AH->connection));
308+
PQdb(AH->connection) ?PQdb(AH->connection) :"",
309+
PQerrorMessage(AH->connection));
309310

310311
/* check for version mismatch */
311312
_check_database_version(AH);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp