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:
parent
9766c16bd0
commit
963783d744
@ -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++;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user