From 03c00afbd3cd32d931e320b17ae35d7bcf0f93d9 Mon Sep 17 00:00:00 2001 From: Nathan Moinvaziri Date: Mon, 11 Dec 2023 17:59:12 -0800 Subject: [PATCH] test2 --- net_util.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net_util.c b/net_util.c index 6589388..ce238d8 100644 --- a/net_util.c +++ b/net_util.c @@ -80,7 +80,9 @@ static char *dns_resolve_filter(const char *host, int32_t family, uint8_t max_ad (uint32_t)(max_ai_string - ai_string_len), NULL, 0, NI_NUMERICHOST); if (err != 0) { printf("getnameinfo fail\n"); - goto dns_resolve_error; + if (ai_string_len < max_ai_string) + ai_string[ai_string_len] = 0; + continue; } max_addrs--;