emacs-bug-tracker
[Top][All Lists]
Advanced

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

bug#53333: closed (Fix for crash in ebrowse)


From: GNU bug Tracking System
Subject: bug#53333: closed (Fix for crash in ebrowse)
Date: Thu, 20 Jan 2022 11:47:01 +0000

Your message dated Thu, 20 Jan 2022 13:45:31 +0200
with message-id <83zgnqpr50.fsf@gnu.org>
and subject line Re: bug#53333: Fix for crash in ebrowse
has caused the debbugs.gnu.org bug report #53333,
regarding Fix for crash in ebrowse
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
53333: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=53333
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: Fix for crash in ebrowse Date: Mon, 17 Jan 2022 17:35:36 -0500 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Hello --

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.

Best,


Attachment: ebrowse-emacs-27.2-fix.diff
Description: Text Data

-- 

Jan Stranik

--- End Message ---
--- Begin Message --- Subject: Re: bug#53333: Fix for crash in ebrowse Date: Thu, 20 Jan 2022 13:45:31 +0200
> 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.


--- End Message ---

reply via email to

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