projects
/
users
/
hanada
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5cdd65f
)
Fix crash caused by NULL lookup when reporting IP address of failed
author
Bruce Momjian
<
[email protected]
>
Thu, 16 Dec 2010 15:13:43 +0000
(10:13 -0500)
committer
Bruce Momjian
<
[email protected]
>
Thu, 16 Dec 2010 15:13:43 +0000
(10:13 -0500)
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).
src/interfaces/libpq/fe-connect.c
patch
|
blob
|
blame
|
history
diff --git
a/src/interfaces/libpq/fe-connect.c
b/src/interfaces/libpq/fe-connect.c
index b1523a6a893422af5df9bd25abbe6da9d554aa42..8d9400be0fc7c30f27a7ac949912d79ef7da4be3 100644
(file)
--- a/
src/interfaces/libpq/fe-connect.c
+++ b/
src/interfaces/libpq/fe-connect.c
@@
-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"