1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-10-27 10:25:06 +03:00

nss-resolve: fix gethostbyaddr h_aliases

Fix the comparison to include the first alias, which will
otherwise be left as a bogus pointer.
This commit is contained in:
Samu Kallio 2016-01-26 19:26:48 +02:00
parent 9766c16bd0
commit 963783d744

View File

@ -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++;