diff options
author | kris <kris@FreeBSD.org> | 2000-08-04 10:39:34 +0000 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2000-08-04 10:39:34 +0000 |
commit | efb065997b3e1848255610e4c1684ec741c07acc (patch) | |
tree | dc8a1a4ccc1d75acbe922eefc6f4580686d090d6 | |
parent | 3f1752b9dcb1ed8519089d1d6b7cba908d58b57d (diff) | |
download | FreeBSD-src-efb065997b3e1848255610e4c1684ec741c07acc.zip FreeBSD-src-efb065997b3e1848255610e4c1684ec741c07acc.tar.gz |
sprintf() -> snprintf() paranoia.
-rw-r--r-- | libexec/rlogind/rlogind.c | 4 |
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); } |