diff options
-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); } |