From 570291a686117b4e78c97d649bd97298a5ef6c1f Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Sun, 15 Sep 1996 21:56:12 +0000 Subject: sprintf -> snprintf paranoia --- bin/chio/chio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'bin') 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 != '<') -- cgit v1.2.3