Skip to content

Commit

Permalink
Don't follow the NULL pointer, not even in debug printouts.
Browse files Browse the repository at this point in the history
Bug reported by Leonhard Knauff.

Closes RADSECPROXY-68.
  • Loading branch information
Linus Nordberg committed Oct 17, 2016
1 parent e901dd8 commit 6a45e69
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Fabian Mauchle
Faidon Liambotis
Hans Zandbelt
Kolbjørn Barmen
Leonhard Knauff
Linus Nordberg
Luke Benes
Maja Wolniewicz
Expand Down
5 changes: 4 additions & 1 deletion hostport.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,10 @@ int resolvehostport(struct hostportres *hp, int af, int socktype, uint8_t passiv
}
}
}
debug(DBG_DBG, "%s: %s -> %s", __func__, hp->host, addr2string(hp->addrinfo->ai_addr));
debug(DBG_DBG, "%s: %s -> %s", __func__,
(hp->host ? hp->host : "(src info not available)"),
((hp->addrinfo && hp->addrinfo->ai_addr) ?
addr2string(hp->addrinfo->ai_addr) : "(dst info not available)"));
return 1;

errexit:
Expand Down

0 comments on commit 6a45e69

Please sign in to comment.