X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Ffnmatch_loop.c;h=8cd444404a9d6f02c70c5851f1f89615f80569ec;hb=d1fb15ba12436afdd742eaff1ec46f75ee397bda;hp=f89d7486c5c42d8667d9f88a17c9feeefe6ac830;hpb=441aa3044f43e5572f58c354f01e6bc070acd5c7;p=gnulib.git diff --git a/lib/fnmatch_loop.c b/lib/fnmatch_loop.c index f89d7486c..8cd444404 100644 --- a/lib/fnmatch_loop.c +++ b/lib/fnmatch_loop.c @@ -1,5 +1,5 @@ -/* Copyright (C) 1991,1992,1993,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2009 - Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1993, 1996, 1997, 1998, 1999, 2000, 2001, 2002, + 2003, 2004, 2005, 2006, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software; you can redistribute it and/or modify @@ -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]))