diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-02-06 12:49:57 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-02-06 12:49:57 +0000 |
commit | 4126da5bced0ebeb20f0bed1c3ff4679056d89b1 (patch) | |
tree | 8fac3a2537390071c06fc13d633043fc96da0739 /libexec/rexecd | |
parent | ddc24ca117f3c6ce0acd7802c3c6b9ea236ee53e (diff) |
buf oflow
Diffstat (limited to 'libexec/rexecd')
-rw-r--r-- | libexec/rexecd/rexecd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libexec/rexecd/rexecd.c b/libexec/rexecd/rexecd.c index cebbe44d5ba..9df468ecca5 100644 --- a/libexec/rexecd/rexecd.c +++ b/libexec/rexecd/rexecd.c @@ -39,7 +39,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)rexecd.c 5.12 (Berkeley) 2/25/91";*/ -static char rcsid[] = "$Id: rexecd.c,v 1.6 1997/01/17 07:12:06 millert Exp $"; +static char rcsid[] = "$Id: rexecd.c,v 1.7 1997/02/06 12:49:56 deraadt Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -258,7 +258,7 @@ error(fmt, a1, a2, a3) char buf[BUFSIZ]; buf[0] = 1; - (void) sprintf(buf+1, fmt, a1, a2, a3); + (void) snprintf(buf+1, sizeof buf-1, fmt, a1, a2, a3); (void) write(2, buf, strlen(buf)); } |