diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-12-11 16:58:32 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-12-11 16:58:32 +0000 |
commit | 61a88ff5bf5e11ac7d93c5be481dd4307df4bd16 (patch) | |
tree | 641044919a9c516dab8f248f31834f4962ec4868 /usr.sbin | |
parent | e41c3d090e131c31117be4405641af3bae013faa (diff) |
handle snprintf < 0
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/config/mkheaders.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/config/mkheaders.c b/usr.sbin/config/mkheaders.c index 7bc78f6601a..cfe3606ad38 100644 --- a/usr.sbin/config/mkheaders.c +++ b/usr.sbin/config/mkheaders.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mkheaders.c,v 1.14 2002/07/14 02:59:41 deraadt Exp $ */ +/* $OpenBSD: mkheaders.c,v 1.15 2002/12/11 16:58:31 deraadt Exp $ */ /* $NetBSD: mkheaders.c,v 1.12 1997/02/02 21:12:34 thorpej Exp $ */ /* @@ -154,7 +154,7 @@ emitopt(nv) option->nv_name); } - if (totlen >= sizeof new_contents) { + if (totlen < 0 || totlen >= sizeof new_contents) { fprintf(stderr, "config: string too long\n"); return (1); } |