emacs-devel
[Top][All Lists]
Advanced

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

Re: regex.c bug? - Re: HTML Mode and Turkish Locale - Segfault


From: Stefan Monnier
Subject: Re: regex.c bug? - Re: HTML Mode and Turkish Locale - Segfault
Date: Tue, 28 Nov 2006 01:49:23 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (gnu/linux)

> In tr_TR.UTF-8, 'I' is translated to #x51051 (U+0131).  But,
> it seems that SET_LIST_BIT assumes that the argument is less
> than 256 (or 128).  So, I've just installed the following
> change.

> @@ -2939,7 +2939,8 @@
>                          for (ch = 0; ch < 1 << BYTEWIDTH; ++ch)
>                         {
>                           int translated = TRANSLATE (ch);
> -                         if (re_iswctype (btowc (ch), cc))
> +                         if (translated < (1 << BYTEWIDTH)
> +                             && re_iswctype (btowc (ch), cc))
>                             SET_LIST_BIT (translated);
>                         }

> If translated is set to a mutibyte character, I think the
> above SET_RANGE_TABLE_WORK_AREA_BIT handles such a case.

> Stefan, could you please confirm that my guess above is
> correct?

That looks correct, yes.  Thank you,


        Stefan




reply via email to

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