diff options
author | deraadt <deraadt@openbsd.org> | 2002-05-22 00:33:39 +0000 |
---|---|---|
committer | deraadt <deraadt@openbsd.org> | 2002-05-22 00:33:39 +0000 |
commit | 52b755013a9cffa2c49ad3c0e1fe62cd5b118fd5 (patch) | |
tree | d098429b1c16179f333e991d747cc5bf935c6824 /libexec/talkd | |
parent | strlcpy sprinkling (diff) | |
download | wireguard-openbsd-52b755013a9cffa2c49ad3c0e1fe62cd5b118fd5.tar.xz wireguard-openbsd-52b755013a9cffa2c49ad3c0e1fe62cd5b118fd5.zip |
whack sprintf
Diffstat (limited to 'libexec/talkd')
-rw-r--r-- | libexec/talkd/print.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libexec/talkd/print.c b/libexec/talkd/print.c index b0dca626f3a..0f6250118d7 100644 --- a/libexec/talkd/print.c +++ b/libexec/talkd/print.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print.c,v 1.3 2001/12/07 18:45:33 mpech Exp $ */ +/* $OpenBSD: print.c,v 1.4 2002/05/22 00:33:39 deraadt Exp $ */ /* * Copyright (c) 1983 Regents of the University of California. @@ -35,7 +35,7 @@ #ifndef lint /*static char sccsid[] = "from: @(#)print.c 5.8 (Berkeley) 2/26/91";*/ -static char rcsid[] = "$Id: print.c,v 1.3 2001/12/07 18:45:33 mpech Exp $"; +static char rcsid[] = "$Id: print.c,v 1.4 2002/05/22 00:33:39 deraadt Exp $"; #endif /* not lint */ /* debug print routines */ @@ -63,7 +63,7 @@ print_request(cp, mp) char tbuf[80], *tp; if (mp->type > NTYPES) { - (void)sprintf(tbuf, "type %d", mp->type); + (void)snprintf(tbuf, sizeof tbuf, "type %d", mp->type); tp = tbuf; } else tp = types[mp->type]; @@ -79,12 +79,12 @@ print_response(cp, rp) char tbuf[80], *tp, abuf[80], *ap; if (rp->type > NTYPES) { - (void)sprintf(tbuf, "type %d", rp->type); + (void)snprintf(tbuf, sizeof tbuf, "type %d", rp->type); tp = tbuf; } else tp = types[rp->type]; if (rp->answer > NANSWERS) { - (void)sprintf(abuf, "answer %d", rp->answer); + (void)snprintf(abuf, sizeof abuf, "answer %d", rp->answer); ap = abuf; } else ap = answers[rp->answer]; |