Skip to content
Snippets Groups Projects
Commit 48da2b87 authored by Bruce Momjian's avatar Bruce Momjian
Browse files

Fix crash caused by NULL lookup when reporting IP address of failed

libpq connection, per report from Magnus.  This happens only on GIT
master and only on Win32 because that is the platform where "" maps to
an IP address (localhost).
parent 5cdd65f3
No related branches found
No related tags found
No related merge requests found
......@@ -1031,7 +1031,8 @@ connectFailureMessage(PGconn *conn, int errorno)
strcpy(host_addr, "???");
display_host_addr = (conn->pghostaddr == NULL) &&
(strcmp(conn->pghost, host_addr) != 0);
(conn->pghost != NULL) &&
(strcmp(conn->pghost, host_addr) != 0);
appendPQExpBuffer(&conn->errorMessage,
libpq_gettext("could not connect to server: %s\n"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment