public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix lookup of collation sequence value during regexp matching
@ 2010-05-05  8:27 Andreas Schwab
  0 siblings, 0 replies; only message in thread
From: Andreas Schwab @ 2010-05-05  8:27 UTC (permalink / raw)
  To: libc-hacker

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.
---
 posix/regexec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/posix/regexec.c b/posix/regexec.c
index f877016..7f7ae31 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);
-- 
1.7.0.1

-- 
Andreas Schwab, schwab@redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84  5EC7 45C6 250E 6F00 984E
"And now for something completely different."

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-05-05  8:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-05  8:27 [PATCH] Fix lookup of collation sequence value during regexp matching Andreas Schwab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).