summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSamu Kallio <samu@samukallio.net>2016-01-26 19:26:48 +0200
committerSamu Kallio <samu@samukallio.net>2016-01-26 19:44:20 +0200
commit963783d7447cad48e594846a865b26535874679d (patch)
treea0a578c6a1d5e2d56aec3b836bd4b97e43b000be /src
parent9766c16bd08bd6714064ee950798a6db0874b048 (diff)
nss-resolve: fix gethostbyaddr h_aliases
Fix the comparison to include the first alias, which will otherwise be left as a bogus pointer.
Diffstat (limited to 'src')
-rw-r--r--src/nss-resolve/nss-resolve.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nss-resolve/nss-resolve.c b/src/nss-resolve/nss-resolve.c
index a268c3ac31..2b716a69d1 100644
--- a/src/nss-resolve/nss-resolve.c
+++ b/src/nss-resolve/nss-resolve.c
@@ -659,7 +659,7 @@ enum nss_status _nss_resolve_gethostbyaddr2_r(
p = buffer + idx;
memcpy(p, n, l+1);
- if (i > 1)
+ if (i > 0)
((char**) r_aliases)[i-1] = p;
i++;