Subject: bug#3552: 23.0.94; backward-prefix-chars: Point before start of properties

From: Noam Postavsky <[email-masked]>
Date: Sat, 4 Jun 2016 11:22:23 -0400

On Sat, Jun 4, 2016 at 9:35 AM, Noam Postavsky
<[email-masked]> 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);