diff options
Diffstat (limited to 'libexec/telnetd/global.c')
-rw-r--r-- | libexec/telnetd/global.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libexec/telnetd/global.c b/libexec/telnetd/global.c index 841fbb5ae80..395102757f8 100644 --- a/libexec/telnetd/global.c +++ b/libexec/telnetd/global.c @@ -93,6 +93,8 @@ output_data (const char *format, ...) va_start(args, format); remaining = BUFSIZ - (nfrontp - netobuf); + if (remaining == 0) + return remaining; if ((n = vsnprintf(nfrontp, remaining, format, args)) >= remaining || n < 0) n = strlen(nfrontp); nfrontp += n; |