diff options
Diffstat (limited to 'usr.bin/patch/inp.c')
-rw-r--r-- | usr.bin/patch/inp.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/patch/inp.c b/usr.bin/patch/inp.c index eed1aefad68..67cc3a83d72 100644 --- a/usr.bin/patch/inp.c +++ b/usr.bin/patch/inp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inp.c,v 1.36 2012/04/10 14:46:34 ajacoutot Exp $ */ +/* $OpenBSD: inp.c,v 1.37 2013/11/26 13:19:07 deraadt Exp $ */ /* * patch - a program to apply diffs to original files @@ -461,11 +461,12 @@ rev_in_string(const char *string) if (revision == NULL) return true; patlen = strlen(revision); - if (strnEQ(string, revision, patlen) && isspace(string[patlen])) + if (strnEQ(string, revision, patlen) && + isspace((unsigned char)string[patlen])) return true; for (s = string; *s; s++) { - if (isspace(*s) && strnEQ(s + 1, revision, patlen) && - isspace(s[patlen + 1])) { + if (isspace((unsigned char)*s) && strnEQ(s + 1, revision, patlen) && + isspace((unsigned char)s[patlen + 1])) { return true; } } |