diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-07-03 23:07:33 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-07-03 23:07:33 +0000 |
commit | dc6bee77030037d4bd185b22d995e214ae04f685 (patch) | |
tree | 400174286cdda3a1d3cbe525b854050c6921a6bc /gnu/usr.bin/rcs | |
parent | 334b37433fe4b60eca290f780da26fcb12abaa43 (diff) |
if localid is too long, abort; found by cloder@acm.org
Diffstat (limited to 'gnu/usr.bin/rcs')
-rw-r--r-- | gnu/usr.bin/rcs/src/rcskeys.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gnu/usr.bin/rcs/src/rcskeys.c b/gnu/usr.bin/rcs/src/rcskeys.c index 1868ebf7106..3cccf435f4e 100644 --- a/gnu/usr.bin/rcs/src/rcskeys.c +++ b/gnu/usr.bin/rcs/src/rcskeys.c @@ -29,6 +29,9 @@ Report problems and direct all questions to: /* * $Log: rcskeys.c,v $ + * Revision 1.4 2002/07/03 23:07:32 deraadt + * if localid is too long, abort; found by cloder@acm.org + * * Revision 1.3 1996/08/12 21:05:54 millert * slightly less gross fix to avoid a coredump. * @@ -73,7 +76,7 @@ Report problems and direct all questions to: #include "rcsbase.h" -libId(keysId, "$Id: rcskeys.c,v 1.3 1996/08/12 21:05:54 millert Exp $") +libId(keysId, "$Id: rcskeys.c,v 1.4 2002/07/03 23:07:32 deraadt Exp $") char const *Keyword[] = { @@ -122,8 +125,10 @@ setRCSlocalId(string) { static char local_id[keylength+1]; - if (strlen(string) > keylength) + if (strlen(string) > keylength) { error("LocalId is too long"); + exit(1); + } VOID strcpy(local_id, string); Keyword[LocalId] = local_id; } |