diff options
author | Rich Felker <dalias@aerifal.cx> | 2013-02-02 01:59:53 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2013-02-02 01:59:53 -0500 |
commit | c0193550a022cb75d1cddb0254e98029b3b56420 (patch) | |
tree | b3cc8851930db0386b29ac37da4aed48ddc3ec3d /src/network/getaddrinfo.c | |
parent | b0302863a36ef6ad24bd25e3ef4df74b9a56980d (diff) | |
download | musl-c0193550a022cb75d1cddb0254e98029b3b56420.tar.gz |
fix blank ai_canonname from getaddrinfo for non-CNAMEs
Diffstat (limited to 'src/network/getaddrinfo.c')
-rw-r--r-- | src/network/getaddrinfo.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/getaddrinfo.c b/src/network/getaddrinfo.c index b341912d..3d7b9ecd 100644 --- a/src/network/getaddrinfo.c +++ b/src/network/getaddrinfo.c @@ -219,7 +219,7 @@ int getaddrinfo(const char *restrict host, const char *restrict serv, const stru while (j--) buf[i++].sa.sin.sin_family = AF_INET6; } - if (__dns_get_rr((void *)&buf[cnt], 0, 256, 1, reply, RR_CNAME, 1) < 0) + if (__dns_get_rr((void *)&buf[cnt], 0, 256, 1, reply, RR_CNAME, 1) <= 0) strcpy((void *)&buf[cnt], host); for (i=0; i<cnt; i++) { |