String paranoia. Merged from regular telnet.

git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@69384 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
This commit is contained in:
asmodai 2000-11-30 10:55:25 +00:00
parent 312e8003c1
commit a352b628e8
1 changed files with 2 additions and 2 deletions

View File

@ -361,7 +361,7 @@ fatal(f, msg)
{
char buf[BUFSIZ];
(void) sprintf(buf, "telnetd: %s.\r\n", msg);
(void) snprintf(buf, sizeof(buf), "telnetd: %s.\r\n", msg);
#ifdef ENCRYPTION
if (encrypt_output) {
/*
@ -384,7 +384,7 @@ fatalperror(f, msg)
{
char buf[BUFSIZ], *strerror();
(void) sprintf(buf, "%s: %s", msg, strerror(errno));
(void) snprintf(buf, sizeof(buf), "%s: %s", msg, strerror(errno));
fatal(f, buf);
}