diff options
author | Joaquim Monteiro <joaquim.monteiro@protonmail.com> | 2024-06-23 21:23:47 +0100 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2024-10-30 10:15:30 -0700 |
commit | 18c9cd6ab799cf8bd7fb90b4965455bece0046c3 (patch) | |
tree | 022ab2857b748546e866eb921039150f30291269 | |
parent | e8302b707d6fddf8e27daa0b3ef70fd3efec823c (diff) |
os: Fix siHostnameAddrMatch in the case where h_addr isn't defined
When IPv6 support isn't enabled, and h_addr isn't defined,
there is no for loop, so the break statement is invalid.
Signed-off-by: Joaquim Monteiro <joaquim.monteiro@protonmail.com>
(cherry picked from commit a6a993f9508ff0bd6f19695b2dfaef170c652525)
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1737>
-rw-r--r-- | os/access.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/os/access.c b/os/access.c index 9fe8bb7c7..74facf4e1 100644 --- a/os/access.c +++ b/os/access.c @@ -1885,7 +1885,9 @@ siHostnameAddrMatch(int family, void *addr, int len, if ((f == family) && (len == hostaddrlen) && (memcmp(addr, hostaddr, len) == 0)) { res = TRUE; +#ifdef h_addr break; +#endif } } } |