$OpenBSD: patch-src_utils_c,v 1.2 2007/05/30 22:33:11 naddy Exp $ --- src/utils.c.orig Sun Dec 19 06:51:31 2004 +++ src/utils.c Wed May 30 16:25:24 2007 @@ -706,7 +706,7 @@ logical wildmatch(char *s, char *p, char *whole, int n below. */ ss = strchr(s, '\0'); pp = strchr(p, '\0'); - while ((*ss == *pp || *pp == '?') && ss >= s && *pp != '*') { + while (ss >= s && *pp != '*' && (*ss == *pp || *pp == '?')) { ss--; /* pp != p is covered because *p == '*' */ pp--; }