Subject: Re: bug#53333: Fix for crash in ebrowse

From: Eli Zaretskii <[email-masked]>
Date: Tue, 18 Jan 2022 20:09:18 +0200

> Date: Mon, 17 Jan 2022 17:35:36 -0500
> From:  Jan Stranik via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> attached is a patch to ebrowse. Noticed a one-off write error in case of
> identifiers that are too long and need escaping. The patch prevents the
> write to memory outside of allocated range which on my platform caused
> segfault.

Thanks, but can you explain the need for this part:

> !           else {
> !               s++;
> !               break;
> !           }
> !       }

Why do we need to advance the pointer 's' in the 'else' clause? why
not leave it alone?

Or maybe I will understand the reason if you show some simple code
that hits this problem (which would be a good thing of its own, as
we'd then have a test to add to our test suite)?