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

Commit48da2b8

Browse files
committed
Fix crash caused by NULL lookup when reporting IP address of failed
libpq connection, per report from Magnus. This happens only on GITmaster and only on Win32 because that is the platform where "" maps toan IP address (localhost).
1 parent5cdd65f commit48da2b8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎src/interfaces/libpq/fe-connect.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1031,7 +1031,8 @@ connectFailureMessage(PGconn *conn, int errorno)
10311031
strcpy(host_addr, "???");
10321032

10331033
display_host_addr= (conn->pghostaddr==NULL)&&
1034-
(strcmp(conn->pghost,host_addr)!=0);
1034+
(conn->pghost!=NULL)&&
1035+
(strcmp(conn->pghost,host_addr)!=0);
10351036

10361037
appendPQExpBuffer(&conn->errorMessage,
10371038
libpq_gettext("could not connect to server: %s\n"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp