GNU bug report logs - #3552
23.0.94; backward-prefix-chars: Point before start of properties

Previous Next

Package: emacs;

Reported by: bojohan+mail <at> dd.chalmers.se (Johan Bockgård)

Date: Sat, 13 Jun 2009 10:45:03 UTC

Severity: important

Tags: confirmed, patch

Merged with 17132, 19379

Found in versions 24.3.50, 24.5, 25.0.50, 25.0.94

Fixed in version 25.1

Done: Noam Postavsky <npostavs <at> users.sourceforge.net>

Bug is archived. No further changes may be made.

Full log


Message #24 received at 3552 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: 3552 <at> debbugs.gnu.org
Subject: Re: bug#3552: 23.0.94;
 backward-prefix-chars: Point before start of properties
Date: Sat, 4 Jun 2016 11:22:23 -0400
On Sat, Jun 4, 2016 at 9:35 AM, Noam Postavsky
<npostavs <at> users.sourceforge.net> wrote:
> I propose the following patch be applied to the emacs-25 branch:

Sorry, that's not quite right, I didn't realize DEC_BOTH also reads
from the buffer, here is a patch that actually fixes the invalid read:

@@ -3109,8 +3109,10 @@ DEFUN ("backward-prefix-chars",
Fbackward_prefix_chars, Sbackward_prefix_chars,
       opoint = pos;
       opoint_byte = pos_byte;

-      if (pos + 1 > beg)
+      if (pos > beg)
     DEC_BOTH (pos, pos_byte);
+      else
+        break;
     }

   SET_PT_BOTH (opoint, opoint_byte);




This bug report was last modified 8 years and 345 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.