diff options
author | mpp <mpp@FreeBSD.org> | 1997-04-08 20:36:36 +0000 |
---|---|---|
committer | mpp <mpp@FreeBSD.org> | 1997-04-08 20:36:36 +0000 |
commit | d1efa8f258647982c6b69ce0b11767fc814ecac6 (patch) | |
tree | a4542b62eadef621e8360a0c0625a52d1cff0780 /libexec/uucpd | |
parent | dd5458250f6fb820e51988382c49f48a7eb39828 (diff) | |
download | FreeBSD-src-d1efa8f258647982c6b69ce0b11767fc814ecac6.zip FreeBSD-src-d1efa8f258647982c6b69ce0b11767fc814ecac6.tar.gz |
Ensure that the remote host name is Nul terminated.
Closes PR# 2589.
Diffstat (limited to 'libexec/uucpd')
-rw-r--r-- | libexec/uucpd/uucpd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libexec/uucpd/uucpd.c b/libexec/uucpd/uucpd.c index 8f53807..f95b388 100644 --- a/libexec/uucpd/uucpd.c +++ b/libexec/uucpd/uucpd.c @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: uucpd.c,v 1.11 1997/04/01 20:39:59 joerg Exp $ + * $Id: uucpd.c,v 1.12 1997/04/08 12:32:17 davidn Exp $ */ #ifndef lint @@ -257,6 +257,7 @@ void dologin(struct passwd *pw, struct sockaddr_in *sin) } else strncpy(remotehost, inet_ntoa(sin->sin_addr), sizeof (remotehost)); + remotehost[sizeof remotehost - 1] = '\0'; /* hack, but must be unique and no tty line */ sprintf(line, "uucp%ld", getpid()); time(&cur_time); |