diff options
-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; } |