From ce75db554ab26dce3676dafeb91500c6bbd7bd60 Mon Sep 17 00:00:00 2001 From: Pyry Kovanen Date: Thu, 19 Oct 2023 16:44:38 +0300 Subject: [PATCH] ames: call getaddrinfo with fqdn for more reliability --- pkg/vere/io/ames.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/vere/io/ames.c b/pkg/vere/io/ames.c index 24baa6e042..ec429cc3b2 100644 --- a/pkg/vere/io/ames.c +++ b/pkg/vere/io/ames.c @@ -1109,10 +1109,10 @@ _ames_czar(u3_pact* pac_u) // NB: . separator not counted, as [nam_c] includes a ~ that we skip // pac_u->rut_u.dns_c = - c3_malloc(1 + strlen(nam_c) + strlen(sam_u->dns_c)); + c3_malloc(2 + strlen(nam_c) + strlen(sam_u->dns_c)); sas_i = - snprintf(pac_u->rut_u.dns_c, 255, "%s.%s", nam_c + 1, sam_u->dns_c); + snprintf(pac_u->rut_u.dns_c, 255, "%s.%s.", nam_c + 1, sam_u->dns_c); c3_free(nam_c); u3z(nam);