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)
committerUlrich Drepper <drepper@redhat.com>
Wed, 5 May 2010 16:59:25 +0000 (09:59 -0700)
ChangeLog
posix/regexec.c

index e379606..b3d22b8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
-2010-05-05  Andreas Schwab  <schwab@redhat.com>
+2010-05-04  Andreas Schwab  <schwab@redhat.com>
 
-       * INSTALL: Regenerate.
+       * posix/regexec.c (find_collation_sequence_value): Fix skipping
+       the wide char sequence of the collating element.
 
 2010-05-05  Ulrich Drepper  <drepper@redhat.com>
 
index f877016..7f7ae31 100644 (file)
@@ -4031,7 +4031,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);