commit 851ce1cb766cf295db85900aab804c0f82c12ab3 Author: Steve Dickson Date: Tue Jul 31 09:57:19 2007 -0400 Stop rpc.mound from crashing by m_hostname becoming corrupted with very long host names. Signed-off-by: Steve Dickson diff --git a/utils/mountd/auth.c b/utils/mountd/auth.c index f7fe23d..eff0ba7 100644 --- a/utils/mountd/auth.c +++ b/utils/mountd/auth.c @@ -93,7 +93,8 @@ auth_authenticate_internal(char *what, struct sockaddr_in *caller, *error = unknown_host; if (!n) return NULL; - strcpy(my_client.m_hostname, *n?n:"DEFAULT"); + snprintf(my_client.m_hostname, (NFSCLNT_IDMAX+1), + "%s", *n?n:"DEFAULT"); free(n); my_client.m_naddr = 1; my_exp.m_client = &my_client;