diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-04-26 02:28:25 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-04-26 02:28:25 +0000 |
commit | f1bcf4518c8be28e8a779f3a9f5fcefc62e6ea95 (patch) | |
tree | 67913398f5ae34197f7cd5ad8baa2095d9ba8cba /usr.bin/xlint | |
parent | 06e33d45a328a88d70c4bef50764764e51c54895 (diff) |
string cleaning; ok tdeval
Diffstat (limited to 'usr.bin/xlint')
-rw-r--r-- | usr.bin/xlint/lint1/emit.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/xlint/lint1/emit.c b/usr.bin/xlint/lint1/emit.c index 29d637efe34..d1bff6ad212 100644 --- a/usr.bin/xlint/lint1/emit.c +++ b/usr.bin/xlint/lint1/emit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: emit.c,v 1.4 2002/02/19 19:39:39 millert Exp $ */ +/* $OpenBSD: emit.c,v 1.5 2003/04/26 02:28:24 deraadt Exp $ */ /* $NetBSD: emit.c,v 1.2 1995/07/03 21:24:00 cgd Exp $ */ /* @@ -33,7 +33,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: emit.c,v 1.4 2002/02/19 19:39:39 millert Exp $"; +static char rcsid[] = "$OpenBSD: emit.c,v 1.5 2003/04/26 02:28:24 deraadt Exp $"; #endif #include <stdio.h> @@ -202,9 +202,10 @@ void outint(i) int i; { - if ((ob.o_end - ob.o_nxt) < 3 * sizeof (int)) + if ((ob.o_end - ob.o_nxt) < 12) outxbuf(); - ob.o_nxt += sprintf(ob.o_nxt, "%d", i); + snprintf(ob.o_nxt, ob.o_end - ob.o_nxt, "%d", i); + ob.o_nxt += strlen(ob.o_nxt); } /* |