diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1997-01-17 15:46:56 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1997-01-17 15:46:56 +0000 |
commit | e3ff6ee1850c6cf71f8f19bfd5501ac5d234e1ea (patch) | |
tree | 71bbd326f407bf5e68a0bbbbc4ab17cb62cfed55 /usr.sbin/rmt/rmt.c | |
parent | 348f45563bb2ab8c9ffbeb8865f98c54e79c02f1 (diff) |
Fix potential buf oflow wrt strerror and sprintf.
Diffstat (limited to 'usr.sbin/rmt/rmt.c')
-rw-r--r-- | usr.sbin/rmt/rmt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/rmt/rmt.c b/usr.sbin/rmt/rmt.c index a064ba14969..cb665ef802b 100644 --- a/usr.sbin/rmt/rmt.c +++ b/usr.sbin/rmt/rmt.c @@ -39,7 +39,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)rmt.c 5.6 (Berkeley) 6/1/90";*/ -static char rcsid[] = "$Id: rmt.c,v 1.2 1996/08/10 22:24:18 deraadt Exp $"; +static char rcsid[] = "$Id: rmt.c,v 1.3 1997/01/17 15:46:55 millert Exp $"; #endif /* not lint */ /* @@ -240,6 +240,6 @@ error(num) { DEBUG2("rmtd: E %d (%s)\n", num, strerror(num)); - (void) sprintf(resp, "E%d\n%s\n", num, strerror(num)); + (void) snprintf(resp, sizeof (resp), "E%d\n%s\n", num, strerror(num)); (void) write(1, resp, strlen(resp)); } |