[15514] in Athena Bugs
fix for ftpd client hostname logging
daemon@ATHENA.MIT.EDU (mhpower@MIT.EDU)
Thu Sep 18 22:02:47 1997
From: <mhpower@MIT.EDU>
Date: Thu, 18 Sep 1997 22:00:22 -0400
To: bugs@MIT.EDU
It appears that ftpd doesn't verify that the string containing the
client's hostname is NUL-terminated before passing that string as an
argument to syslog. The patch below should fix this; it's relative to
/mit/source/athena/etc/ftpd/ftpd.c
Matt
*** ftpd.c.old Tue Jun 3 00:01:46 1997
--- ftpd.c Thu Sep 18 21:55:22 1997
***************
*** 1060,1061 ****
--- 1060,1062 ----
(void) strncpy(remotehost, hp->h_name, sizeof (remotehost));
+ remotehost[sizeof(remotehost) - 1] = '\0';
endhostent();