diff options
author | Andreas Schwab <schwab@suse.de> | 2020-09-16 12:41:14 +0200 |
---|---|---|
committer | Andreas Schwab <schwab@suse.de> | 2020-09-16 14:45:10 +0200 |
commit | a140ff9162f353e804d6a8c83c8f3c18511850dd (patch) | |
tree | a2e8b02861633aa706fc07588926b75f9835dcd2 /posix/fnmatch_loop.c | |
parent | 4b564f347fdcd021dbb6c1ada98a18249d9e888a (diff) | |
download | glibc-a140ff9162f353e804d6a8c83c8f3c18511850dd.zip glibc-a140ff9162f353e804d6a8c83c8f3c18511850dd.tar.gz glibc-a140ff9162f353e804d6a8c83c8f3c18511850dd.tar.bz2 |
Fix handling of collating symbols in fnmatch (bug 26620)
The variable idx contains the index into the extra array, whereas wextra
points into the extra array at this index, containing the length of the
following collating sequence in the wide character representation.
Diffstat (limited to 'posix/fnmatch_loop.c')
-rw-r--r-- | posix/fnmatch_loop.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/posix/fnmatch_loop.c b/posix/fnmatch_loop.c index 8ead4dc..0f890d4 100644 --- a/posix/fnmatch_loop.c +++ b/posix/fnmatch_loop.c @@ -564,7 +564,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end, /* Get the collation sequence value. */ is_seqval = 1; # if WIDE_CHAR_VERSION - cold = wextra[1 + wextra[idx]]; + cold = wextra[1 + wextra[0]]; # else idx += 1 + extra[idx]; /* Adjust for the alignment. */ @@ -738,7 +738,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end, /* Get the collation sequence value. */ is_seqval = 1; # if WIDE_CHAR_VERSION - cend = wextra[1 + wextra[idx]]; + cend = wextra[1 + wextra[0]]; # else idx += 1 + extra[idx]; /* Adjust for the alignment. */ |