From d84acf388ed8b3f162dda0512139095bfc268beb Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 5 May 2010 09:59:25 -0700 Subject: Fix lookup of collation sequence value during regexp matching --- posix/regexec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'posix') 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); -- cgit v1.2.3