summaryrefslogtreecommitdiffstats
path: root/contrib/telnet/telnetd
diff options
context:
space:
mode:
authorasmodai <asmodai@FreeBSD.org>2000-11-30 10:55:25 +0000
committerasmodai <asmodai@FreeBSD.org>2000-11-30 10:55:25 +0000
commit617a96fd6d72303661fd9dfc017527b986f18735 (patch)
tree6b281afd830c09aaf1143663145f4f86830322c7 /contrib/telnet/telnetd
parent517ed0bad5cb36c5f8a9f8ab74429174d1fbdca7 (diff)
downloadFreeBSD-src-617a96fd6d72303661fd9dfc017527b986f18735.zip
FreeBSD-src-617a96fd6d72303661fd9dfc017527b986f18735.tar.gz
String paranoia. Merged from regular telnet.
Diffstat (limited to 'contrib/telnet/telnetd')
-rw-r--r--contrib/telnet/telnetd/utility.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/telnet/telnetd/utility.c b/contrib/telnet/telnetd/utility.c
index dc695fa..da01828 100644
--- a/contrib/telnet/telnetd/utility.c
+++ b/contrib/telnet/telnetd/utility.c
@@ -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);
}
OpenPOWER on IntegriCloud