artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4df5c96
)
sprintf -> snprintf paranoia
author
millert
<millert@openbsd.org>
Sun, 15 Sep 1996 21:56:11 +0000
(21:56 +0000)
committer
millert
<millert@openbsd.org>
Sun, 15 Sep 1996 21:56:11 +0000
(21:56 +0000)
bin/chio/chio.c
patch
|
blob
|
history
diff --git
a/bin/chio/chio.c
b/bin/chio/chio.c
index
a808f9a
..
c573457
100644
(file)
--- 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 deraad
t Exp $ */
+/* $OpenBSD: chio.c,v 1.
3 1996/09/15 21:56:11 miller
t 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 != '<')