- Made '?*' work correctly in wildcard matches, reported by Bugz ().

This commit is contained in:
Bram Matthys 2005-07-05 20:26:18 +00:00
parent 83cc82bbf2
commit 8a9bae11fa
2 changed files with 9 additions and 0 deletions

View file

@ -805,3 +805,4 @@
- Added some TSCTL logging (this reminds me we need to add new log levels for 3.3 ;p).
- Attempt to fix bug #2431: 3.2.3 broke CNAME delegation for reverse dns. I'm sorry it took
so long, but this stuff just plain sucks...
- Made '?*' work correctly in wildcard matches, reported by Bugz (#2585).

View file

@ -139,7 +139,11 @@ static inline int match2(const char *mask, const char *name)
return 1; /* false: no character left */
n++;
if (!*n) /* return true if end of both, */
{
if ((m[0] == '*') && (m[1] == '\0'))
return 0; /* special case.. a '?*' */
return (cm ? 1 : 0); /* false if end of test str only */
}
continue;
}
if (cm == '_') /* found _: check for '_' or ' ' */
@ -149,7 +153,11 @@ static inline int match2(const char *mask, const char *name)
return 1; /* false: didnt match or no character left */
n++;
if (!*n) /* return true if end of both, */
{
if ((m[0] == '*') && (m[1] == '\0'))
return 0; /* special case.. a '?*' */
return (cm ? 1 : 0); /* false if end of test str only */
}
continue;
}
if (cm == '\\') /* next char will not be a wildcard. */