diff options
Diffstat (limited to 'usr.bin/hexdump/conv.c')
-rw-r--r-- | usr.bin/hexdump/conv.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/hexdump/conv.c b/usr.bin/hexdump/conv.c index 5c2e0da330d..7c9c6e7e944 100644 --- a/usr.bin/hexdump/conv.c +++ b/usr.bin/hexdump/conv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conv.c,v 1.4 2001/12/30 08:17:32 pvalchev Exp $ */ +/* $OpenBSD: conv.c,v 1.5 2003/03/13 09:09:31 deraadt Exp $ */ /* $NetBSD: conv.c,v 1.7 2001/12/07 15:14:29 bjh21 Exp $ */ /* @@ -36,7 +36,7 @@ #ifndef lint /*static char sccsid[] = "from: @(#)conv.c 5.4 (Berkeley) 6/1/90";*/ -static char rcsid[] = "$OpenBSD: conv.c,v 1.4 2001/12/30 08:17:32 pvalchev Exp $"; +static char rcsid[] = "$OpenBSD: conv.c,v 1.5 2003/03/13 09:09:31 deraadt Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -91,7 +91,7 @@ conv_c(pr, p) *pr->cchar = 'c'; (void)printf(pr->fmt, *p); } else { - (void)sprintf(buf, "%03o", (int)*p); + (void)snprintf(buf, sizeof buf, "%03o", (int)*p); str = buf; strpr: *pr->cchar = 's'; (void)printf(pr->fmt, str); |