]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix lookup of collation sequence value during regexp matching
authorAndreas Schwab <schwab@redhat.com>
Wed, 5 May 2010 16:59:25 +0000 (09:59 -0700)
committerPetr Baudis <pasky@ucw.cz>
Wed, 12 May 2010 01:21:23 +0000 (03:21 +0200)
(cherry picked from commit d84acf388ed8b3f162dda0512139095bfc268beb)

ChangeLog
posix/regexec.c

index 373742c428132c9deeb92f6e8eb2662c3362040a..921df9b31a0c889eca373f7484be0d78f3155cc3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-05-04  Andreas Schwab  <schwab@redhat.com>
+
+       * posix/regexec.c (find_collation_sequence_value): Fix skipping
+       the wide char sequence of the collating element.
+
 2010-05-03  Ulrich Drepper  <drepper@redhat.com>
 
        [BZ #11149]
index 7bf0c08a78cb2189a6c07b04ce7cc6bf27cc41dc..8481b618dab531596bd696ebefda8367d510c80b 100644 (file)
@@ -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);