X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Ffnmatch_loop.c;h=8cd444404a9d6f02c70c5851f1f89615f80569ec;hb=a2ae92ef0232df237fef9af3e52b52b67d44cb93;hp=bb24904ded0ad6c4b9e30d127b9bb556b0d28c25;hpb=8d8eda4eab3d2801251daf4eb31756c3595e2fc6;p=gnulib.git diff --git a/lib/fnmatch_loop.c b/lib/fnmatch_loop.c index bb24904de..8cd444404 100644 --- a/lib/fnmatch_loop.c +++ b/lib/fnmatch_loop.c @@ -382,15 +382,20 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end, /* We found a table entry. Now see whether the character we are currently at has the same equivalance class value. */ - int len = weights[idx]; + int len = weights[idx & 0xffffff]; int32_t idx2; const UCHAR *np = (const UCHAR *) n; idx2 = findidx (&np); - if (idx2 != 0 && len == weights[idx2]) + if (idx2 != 0 + && (idx >> 24) == (idx2 >> 24) + && len == weights[idx2 & 0xffffff]) { int cnt = 0; + idx &= 0xffffff; + idx2 &= 0xffffff; + while (cnt < len && (weights[idx + 1 + cnt] == weights[idx2 + 1 + cnt]))