summaryrefslogtreecommitdiffstats
path: root/libexec
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2000-08-04 10:39:34 +0000
committerkris <kris@FreeBSD.org>2000-08-04 10:39:34 +0000
commitefb065997b3e1848255610e4c1684ec741c07acc (patch)
treedc8a1a4ccc1d75acbe922eefc6f4580686d090d6 /libexec
parent3f1752b9dcb1ed8519089d1d6b7cba908d58b57d (diff)
downloadFreeBSD-src-efb065997b3e1848255610e4c1684ec741c07acc.zip
FreeBSD-src-efb065997b3e1848255610e4c1684ec741c07acc.tar.gz
sprintf() -> snprintf() paranoia.
Diffstat (limited to 'libexec')
-rw-r--r--libexec/rlogind/rlogind.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libexec/rlogind/rlogind.c b/libexec/rlogind/rlogind.c
index 8fac305..fe272eb 100644
--- a/libexec/rlogind/rlogind.c
+++ b/libexec/rlogind/rlogind.c
@@ -558,10 +558,10 @@ fatal(f, msg, syserr)
if (!confirmed)
*bp++ = '\01'; /* error indicator */
if (syserr)
- len = sprintf(bp, "rlogind: %s: %s.\r\n",
+ len = snprintf(bp, sizeof(buf), "rlogind: %s: %s.\r\n",
msg, strerror(errno));
else
- len = sprintf(bp, "rlogind: %s.\r\n", msg);
+ len = snprintf(bp, sizeof(buf), "rlogind: %s.\r\n", msg);
(void) write(f, buf, bp + len - buf);
exit(1);
}
OpenPOWER on IntegriCloud