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]>
> Index: sed-4.2.1/sed/execute.c
> ===================================================================
> --- sed-4.2.1.orig/sed/execute.c
> +++ sed-4.2.1/sed/execute.c
> @@ -261,7 +261,7 @@ str_append(to, string, length)
>  	    n = 1;
>  	  }
>  
> -        if (n > 0)
> +        if ((n != (size_t) -2) && (n > 0))
>  	  {
>  	    string += n;
>  	    length -= n;

Hi Stanislav,

this was already fixed in git.  See commit 20f68fb1.

Thanks for your work!

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.