From: Andreas Schwab Date: Wed, 5 May 2010 16:59:25 +0000 (-0700) Subject: Fix lookup of collation sequence value during regexp matching X-Git-Tag: fedora/glibc-2.11.1-7~1^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9b562e8bc985e9dd7f1cc0ef8aeb32e448e9cfa;p=thirdparty%2Fglibc.git Fix lookup of collation sequence value during regexp matching (cherry picked from commit d84acf388ed8b3f162dda0512139095bfc268beb) --- diff --git a/ChangeLog b/ChangeLog index 373742c4281..921df9b31a0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-05-04 Andreas Schwab + + * posix/regexec.c (find_collation_sequence_value): Fix skipping + the wide char sequence of the collating element. + 2010-05-03 Ulrich Drepper [BZ #11149] diff --git a/posix/regexec.c b/posix/regexec.c index 7bf0c08a78c..8481b618dab 100644 --- a/posix/regexec.c +++ b/posix/regexec.c @@ -3998,7 +3998,7 @@ find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len) /* Skip the collation sequence value. */ idx += sizeof (uint32_t); /* Skip the wide char sequence of the collating element. */ - idx = idx + sizeof (uint32_t) * (extra[idx] + 1); + idx = idx + sizeof (uint32_t) * (*(int32_t *) (extra + idx) + 1); /* If we found the entry, return the sequence value. */ if (found) return *(uint32_t *) (extra + idx);