Re: [PATCH 1/3] sed: Fix infinite loop on some false multi-byte matches

Paolo Bonzini <[email protected]>
Newsgroups gmane.comp.gnu.utils.bugs
Message-ID <[email protected]>
On 02/10/2012 08:39 PM, Stanislav Brabec wrote:
> Index: sed-4.2.1/lib/regex_internal.c
> ===================================================================
> --- sed-4.2.1.orig/lib/regex_internal.c
> +++ sed-4.2.1/lib/regex_internal.c
> @@ -499,7 +499,7 @@ re_string_skip_chars (re_string_t *pstr,
>      {
>        wchar_t wc2;
>        Idx remain_len;
> -      remain_len = pstr->len - rawbuf_idx;
> +      remain_len = pstr->raw_len - rawbuf_idx;
>        prev_st = pstr->cur_state;
>        mbclen = __mbrtowc (&wc2, (const char *) pstr->raw_mbs + rawbuf_idx,
>  			  remain_len, &pstr->cur_state);

Hi Stanislav, this needs to go to [email protected].  Please 
keep me in Cc.

I'll review the rest on Monday.

Paolo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.