bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: regexec: Fix lookup of collation sequence value during regexp matchi


From: Jim Meyering
Subject: Re: regexec: Fix lookup of collation sequence value during regexp matching
Date: Wed, 05 May 2010 21:44:12 +0200

> http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d84acf388ed8b3f162dda0512139095bfc268beb
>
> commit d84acf388ed8b3f162dda0512139095bfc268beb
> Author: Andreas Schwab <address@hidden>
> Date:   Wed May 5 09:59:25 2010 -0700
>
>     Fix lookup of collation sequence value during regexp matching
...
> +     * posix/regexec.c (find_collation_sequence_value): Fix skipping
> +     the wide char sequence of the collating element.
>
> 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);

Hi Andreas,

Can you demonstrate how to trigger the bug fixed by the above?
I'm thinking of adding a configure-time check for the failure
to gnulib's regex module.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]