aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@redhat.com>2010-05-05 09:59:25 -0700
committerUlrich Drepper <drepper@redhat.com>2010-05-05 09:59:25 -0700
commitd84acf388ed8b3f162dda0512139095bfc268beb (patch)
treef832d5949540bb58645a87613c08c5076c6521b2
parent5d05c55424406c947618d60f06fc0d119a4f0e54 (diff)
downloadglibc-d84acf388ed8b3f162dda0512139095bfc268beb.tar
glibc-d84acf388ed8b3f162dda0512139095bfc268beb.tar.gz
glibc-d84acf388ed8b3f162dda0512139095bfc268beb.tar.bz2
glibc-d84acf388ed8b3f162dda0512139095bfc268beb.zip
Fix lookup of collation sequence value during regexp matching
-rw-r--r--ChangeLog5
-rw-r--r--posix/regexec.c2
2 files changed, 4 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index e379606345..b3d22b851e 100644
--- 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>
diff --git a/posix/regexec.c b/posix/regexec.c
index f87701672b..7f7ae3123f 100644
--- a/posix/regexec.c
+++ b/posix/regexec.c
@@ -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);