diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1996-09-15 21:56:12 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1996-09-15 21:56:12 +0000 |
commit | 570291a686117b4e78c97d649bd97298a5ef6c1f (patch) | |
tree | 482adc53a88400b061d22fd05c8ddfcaae22a06e /bin | |
parent | 3c8475cc046f10efae83cd3b9f17866071bbf1e2 (diff) |
sprintf -> snprintf paranoia
Diffstat (limited to 'bin')
-rw-r--r-- | bin/chio/chio.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/chio/chio.c b/bin/chio/chio.c index a808f9a7a14..c5734570c23 100644 --- a/bin/chio/chio.c +++ b/bin/chio/chio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: chio.c,v 1.2 1996/06/23 14:19:04 deraadt Exp $ */ +/* $OpenBSD: chio.c,v 1.3 1996/09/15 21:56:11 millert Exp $ */ /* $NetBSD: chio.c,v 1.1.1.1 1996/04/03 00:34:38 thorpej Exp $ */ /* @@ -638,7 +638,8 @@ bits_to_string(v, cp) np++; if ((v & (1 << (f - 1))) == 0) continue; - bp += sprintf(bp, "%c%.*s", sep, np - cp, cp); + bp += snprintf(bp, sizeof(buf) - (bp - &buf[0]), + "%c%.*s", sep, np - cp, cp); sep = ','; } if (sep != '<') |