From a6a993f9508ff0bd6f19695b2dfaef170c652525 Mon Sep 17 00:00:00 2001 From: Joaquim Monteiro Date: Sun, 23 Jun 2024 21:23:47 +0100 Subject: [PATCH] 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 Part-of: --- os/access.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/os/access.c b/os/access.c index bb25aac30..8eadb3eda 100644 --- a/os/access.c +++ b/os/access.c @@ -1867,7 +1867,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 } } }