From 96b0341b80d80ed72ba032e340452653816d8c64 Mon Sep 17 00:00:00 2001 From: Michael Hampton Date: Fri, 28 Dec 2001 11:06:53 +0000 Subject: [PATCH] * More server support for hostnames up to 63 characters (oops I missed a spot) --- citadel/ChangeLog | 4 +++- citadel/locate_host.c | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/citadel/ChangeLog b/citadel/ChangeLog index 08260b885..e8e3f976c 100644 --- a/citadel/ChangeLog +++ b/citadel/ChangeLog @@ -1,4 +1,7 @@ $Log$ + Revision 590.21 2001/12/28 11:06:53 error + * More server support for hostnames up to 63 characters (oops I missed a spot) + Revision 590.20 2001/12/28 09:39:10 error * Client support for hostnames up to 63 characters: truncated at 24 in short who list, full display in long who list. @@ -3012,4 +3015,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant Fri Jul 10 1998 Art Cancro * Initial CVS import - diff --git a/citadel/locate_host.c b/citadel/locate_host.c index e71b0cd14..1ca321e33 100644 --- a/citadel/locate_host.c +++ b/citadel/locate_host.c @@ -63,7 +63,7 @@ void locate_host(char *tbuf, const struct in_addr *addr) for (; *ch->h_addr_list; ch->h_addr_list++) if (!memcmp(*ch->h_addr_list, addr, sizeof *addr)) { - safestrncpy(tbuf, ch->h_name, 25); + safestrncpy(tbuf, ch->h_name, 63); goto end; } goto bad_dns; /* they were spoofing. report a numeric IP @@ -75,6 +75,6 @@ void locate_host(char *tbuf, const struct in_addr *addr) end_critical_section(S_NETDB); #endif - tbuf[25] = 0; + tbuf[63] = 0; lprintf(9, "locate_host() exiting\n"); } -- 2.39.2