diff options
author | 2001-08-30 18:17:00 +0000 | |
---|---|---|
committer | 2001-08-30 18:17:00 +0000 | |
commit | 68bebbd71b5b7ee9556eb8277177861b36e4711a (patch) | |
tree | d40b729c457f183cf62ce4d921dc7cca47e7d820 /gnu/usr.bin/cvs/src | |
parent | correctly deal with layout of sigframe (diff) | |
download | wireguard-openbsd-68bebbd71b5b7ee9556eb8277177861b36e4711a.tar.xz wireguard-openbsd-68bebbd71b5b7ee9556eb8277177861b36e4711a.zip |
Fixed version of Matthieu's change from revision 1.12
OK matthieu@ && deraadt@
Diffstat (limited to 'gnu/usr.bin/cvs/src')
-rw-r--r-- | gnu/usr.bin/cvs/src/rcs.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gnu/usr.bin/cvs/src/rcs.c b/gnu/usr.bin/cvs/src/rcs.c index 0ffe73f0658..3719e5561a5 100644 --- a/gnu/usr.bin/cvs/src/rcs.c +++ b/gnu/usr.bin/cvs/src/rcs.c @@ -3546,13 +3546,15 @@ expand_keywords (rcs, ver, name, log, loglen, expand, buf, len, retbuf, retlen) srch_len -= (srch_next + 1) - srch; srch = srch_next + 1; - /* Look for the first non alphabetic character after the '$'. */ + /* Look for the first non alphanumeric character after the '$'. */ send = srch + srch_len; - for (s = srch; s < send; s++) - if (! isalpha ((unsigned char) *s)) + if (! isalpha((unsigned char) *srch)) + continue; /* first character of a tag must be a letter */ + for (s = srch+1; s < send; s++) + if (! isalnum ((unsigned char) *s)) break; - /* If the first non alphabetic character is not '$' or ':', + /* If the first non alphanumeric character is not '$' or ':', then this is not an RCS keyword. */ if (s == send || (*s != '$' && *s != ':')) continue; |