Page MenuHomeFreeBSD

D38441.diff
No OneTemporary

D38441.diff

diff --git a/crypto/openssh/ssh.c b/crypto/openssh/ssh.c
--- a/crypto/openssh/ssh.c
+++ b/crypto/openssh/ssh.c
@@ -1388,18 +1388,21 @@
cinfo->locuser = xstrdup(pw->pw_name);
/* Find canonic host name. */
- if (strchr(host, '.') == 0) {
+ if (strchr(host, '.') == NULL) {
struct addrinfo hints;
struct addrinfo *ai = NULL;
int errgai;
+
memset(&hints, 0, sizeof(hints));
hints.ai_family = options.address_family;
hints.ai_flags = AI_CANONNAME;
hints.ai_socktype = SOCK_STREAM;
errgai = getaddrinfo(host, NULL, &hints, &ai);
if (errgai == 0) {
- if (ai->ai_canonname != NULL)
+ if (ai->ai_canonname != NULL) {
+ free(host);
host = xstrdup(ai->ai_canonname);
+ }
freeaddrinfo(ai);
}
}

File Metadata

Mime Type
text/plain
Expires
Thu, Sep 26, 6:28 AM (21 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
12814200
Default Alt Text
D38441.diff (739 B)

Event Timeline