From: Eli Zaretskii <eliz@gnu.org>
To: Jan Stranik <jan@stranik.org>
Cc: 53333-done@debbugs.gnu.org
Subject: bug#53333: Fix for crash in ebrowse
Date: Thu, 20 Jan 2022 13:45:31 +0200 [thread overview]
Message-ID: <83zgnqpr50.fsf@gnu.org> (raw)
In-Reply-To: <878rvc1pdk.fsf@stranik.org> (message from Jan Stranik on Tue, 18 Jan 2022 20:32:55 -0500)
> From: Jan Stranik <jan@stranik.org>
> Cc: 53333@debbugs.gnu.org
> Date: Tue, 18 Jan 2022 20:32:55 -0500
>
> >
> > 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?
>
> The identifier is copied from end to the buffer. As we are copying, we
> want to escape quote and backslash characters. Normally if we encounter
> any of these characters we just prepend \ to in front. If there is not
> enough space in the buffer to insert the \, we should increase the s, to
> back-out the character that we wanted to escape.
>
> If we would not do that, the first character might not be escaped. If
> that character were a quote, it would break the lisp expressions written
> later to the BROWSE file.
Thanks, I installed the change on the emacs-28 branch, and I'm marking
this bug done.
next prev parent reply other threads:[~2022-01-20 11:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-17 22:35 bug#53333: Fix for crash in ebrowse Jan Stranik via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-18 18:09 ` Eli Zaretskii
2022-01-19 1:32 ` Jan Stranik via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-20 11:45 ` Eli Zaretskii [this message]
2022-01-27 21:20 ` Jan Stranik via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83zgnqpr50.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=53333-done@debbugs.gnu.org \
--cc=jan@stranik.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).