diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1998-06-23 22:40:56 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1998-06-23 22:40:56 +0000 |
commit | 30cb72a00b8cc59895c391cad0f8e31611611ec4 (patch) | |
tree | 3e2f67dd80af3489363cf0596b740c6533994e40 /libexec/telnetd | |
parent | 325437057bbda9490b174c8fc6dc8f0e14a8f145 (diff) |
Fix snprintf return value usage.
Diffstat (limited to 'libexec/telnetd')
-rw-r--r-- | libexec/telnetd/global.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libexec/telnetd/global.c b/libexec/telnetd/global.c index 11b2cd5ed0f..2d2d9a03a3f 100644 --- a/libexec/telnetd/global.c +++ b/libexec/telnetd/global.c @@ -1,4 +1,4 @@ -/* $OpenBSD: global.c,v 1.3 1998/03/12 04:53:11 art Exp $ */ +/* $OpenBSD: global.c,v 1.4 1998/06/23 22:40:29 millert Exp $ */ /* $NetBSD: global.c,v 1.6 1996/02/28 20:38:14 thorpej Exp $ */ /* @@ -39,7 +39,7 @@ static char sccsid[] = "@(#)global.c 8.1 (Berkeley) 6/4/93"; static char rcsid[] = "$NetBSD: global.c,v 1.6 1996/02/28 20:38:14 thorpej Exp $"; #else -static char rcsid[] = "$OpenBSD: global.c,v 1.3 1998/03/12 04:53:11 art Exp $"; +static char rcsid[] = "$OpenBSD: global.c,v 1.4 1998/06/23 22:40:29 millert Exp $"; #endif #endif /* not lint */ @@ -68,6 +68,8 @@ output_data (const char *format, ...) remaining, format, args); + if (ret >= remaining) + ret = remaining - 1; nfrontp += ret; va_end(args); return ret; |