=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/patch/inp.c,v retrieving revision 1.36 retrieving revision 1.37 diff -c -r1.36 -r1.37 *** src/usr.bin/patch/inp.c 2012/04/10 14:46:34 1.36 --- src/usr.bin/patch/inp.c 2013/11/26 13:19:07 1.37 *************** *** 1,4 **** ! /* $OpenBSD: inp.c,v 1.36 2012/04/10 14:46:34 ajacoutot Exp $ */ /* * patch - a program to apply diffs to original files --- 1,4 ---- ! /* $OpenBSD: inp.c,v 1.37 2013/11/26 13:19:07 deraadt Exp $ */ /* * patch - a program to apply diffs to original files *************** *** 461,471 **** if (revision == NULL) return true; patlen = strlen(revision); ! if (strnEQ(string, revision, patlen) && isspace(string[patlen])) return true; for (s = string; *s; s++) { ! if (isspace(*s) && strnEQ(s + 1, revision, patlen) && ! isspace(s[patlen + 1])) { return true; } } --- 461,472 ---- if (revision == NULL) return true; patlen = strlen(revision); ! if (strnEQ(string, revision, patlen) && ! isspace((unsigned char)string[patlen])) return true; for (s = string; *s; s++) { ! if (isspace((unsigned char)*s) && strnEQ(s + 1, revision, patlen) && ! isspace((unsigned char)s[patlen + 1])) { return true; } }