From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#3552: 23.0.94; backward-prefix-chars: Point before start of properties Date: Sat, 4 Jun 2016 17:25:19 -0400 Message-ID: References: <837fe4vnxp.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=94eb2c094b18f1149805347a79df X-Trace: ger.gmane.org 1465075576 18434 80.91.229.3 (4 Jun 2016 21:26:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 4 Jun 2016 21:26:16 +0000 (UTC) Cc: 3552@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 04 23:26:16 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1b9J5D-000284-Ai for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Jun 2016 23:26:15 +0200 Original-Received: from localhost ([::1]:34173 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9J5B-0003Ls-U3 for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Jun 2016 17:26:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43520) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9J55-0003LZ-N1 for bug-gnu-emacs@gnu.org; Sat, 04 Jun 2016 17:26:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b9J4z-0003LH-Rb for bug-gnu-emacs@gnu.org; Sat, 04 Jun 2016 17:26:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42317) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9J4z-0003LD-OJ for bug-gnu-emacs@gnu.org; Sat, 04 Jun 2016 17:26:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1b9J4z-0005WS-J5 for bug-gnu-emacs@gnu.org; Sat, 04 Jun 2016 17:26:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Jun 2016 21:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 3552 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch confirmed Original-Received: via spool by 3552-submit@debbugs.gnu.org id=B3552.146507552821187 (code B ref 3552); Sat, 04 Jun 2016 21:26:01 +0000 Original-Received: (at 3552) by debbugs.gnu.org; 4 Jun 2016 21:25:28 +0000 Original-Received: from localhost ([127.0.0.1]:54654 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9J4R-0005Vf-QW for submit@debbugs.gnu.org; Sat, 04 Jun 2016 17:25:27 -0400 Original-Received: from mail-oi0-f52.google.com ([209.85.218.52]:36461) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9J4P-0005VS-Jd for 3552@debbugs.gnu.org; Sat, 04 Jun 2016 17:25:25 -0400 Original-Received: by mail-oi0-f52.google.com with SMTP id j1so175744796oih.3 for <3552@debbugs.gnu.org>; Sat, 04 Jun 2016 14:25:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=zB1+hDMzNj9fKKSBbWjA5UyVI4+j88G12hrFntjJ1jY=; b=yamMHNlI5yKRraKXj+zawh/O6Xz98UwTaogNUMg35VrRe/2BaQ6Se1FqGs1m4Yirfb c15Xz6TUP/bBiijpGQ3GrbhYKJGXRY6EWM0Umvp9oRilg9JNkgvJSGj81wP5JpPIRiuU lJ8GmkYYj944GJGpSD81+NxSVGoTMBHM4/SHWEEdtoxw4iSX3mowlZZhTYS2HzSSiKB0 gna6IPggRV+qyR9FuoFCnW44AwJ6J2fIWi2GXS3ZSylbYjilXrgZx6sqLKMmLXPtPEKY FD6mRe0X1EoLmERclXkaFF99/dcvOH1bJmJ4m2cUKuizQnvAzoHJfApC5hDBLBg7yYl1 7+Qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=zB1+hDMzNj9fKKSBbWjA5UyVI4+j88G12hrFntjJ1jY=; b=i77Rl9eMJ3jRvqL+OXcIZtPgnnKsWPVX5Y6JicZ5RuuuGPG8Og027LKUcU3HOrzhdX hAO8AeNZPGyKD3A//mllsBa47pl2FHc/KwCwraSTYqDbw/bQrWDtoXLxLSCHUmdkc9qk 2It7svVnSikJdtB7EAIcFV0rgO92RMbUkdZGBzYZNtsdE2nTKSYTW4iGGc746O2AzLMq XJB3aS4MC8G322NnOI03CyZoEyeoTc/Arj9ru+3lKNbyna0rQwoThnMJF1FUi9UIFy+Q AiqvtUd756KZMXsSEJQCv6Li0COQB3BiDShUUcKsXLHBaFuB7JpdjnBxSKUxkn3pDZRq xujQ== X-Gm-Message-State: ALyK8tLBq3JH3HcvZl1mcVDePpwTF97J3VFk9VxauDwBsFIQWRt2ChqNLZ5irjOcozBJ0W+9uiFLK4wXB4uliQ== X-Received: by 10.157.23.195 with SMTP id j61mr5780946otj.92.1465075520043; Sat, 04 Jun 2016 14:25:20 -0700 (PDT) Original-Received: by 10.157.5.168 with HTTP; Sat, 4 Jun 2016 14:25:19 -0700 (PDT) In-Reply-To: <837fe4vnxp.fsf@gnu.org> X-Google-Sender-Auth: OT0QEoXvsQVuAarzyXklHlK8ITo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:119077 Archived-At: --94eb2c094b18f1149805347a79df Content-Type: text/plain; charset=UTF-8 On Sat, Jun 4, 2016 at 1:55 PM, Eli Zaretskii wrote: > I would use > > if (pos <= beg) > break; > DEC_BOTH (pos, pos_byte); Oh yeah, that makes sense; parallels with the same check at the beginning of the function. Full patch attached. --94eb2c094b18f1149805347a79df Content-Type: text/x-diff; charset=US-ASCII; name="0001-Fbackward_prefix_chars-stay-within-buffer-bounds.patch" Content-Disposition: attachment; filename="0001-Fbackward_prefix_chars-stay-within-buffer-bounds.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_ip1o2k9t0 RnJvbSBmYjczOWVlMmY4M2RmNTgyNjZjOGJmYzZhMGU0NDI2ZmVkNWI1ODkwIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBOb2FtIFBvc3RhdnNreSA8bnBvc3RhdnNAZ21haWwuY29tPgpE YXRlOiBTYXQsIDQgSnVuIDIwMTYgMDk6MDI6MjAgLTA0MDAKU3ViamVjdDogW1BBVENIXSBGYmFj a3dhcmRfcHJlZml4X2NoYXJzOiBzdGF5IHdpdGhpbiBidWZmZXIgYm91bmRzCgpUaGUgY29tbWl0 IDFmZDMxNzJkICIoRmJhY2t3YXJkX3ByZWZpeF9jaGFycyk6IFNldCBwb2ludCBwcm9wZXJseSB3 aGlsZQpzY2FubmluZyIgKDE5OTgtMDMtMTgpLCBtb3ZlZCB0aGUgY2hlY2sgYWdhaW5zdCBvZiB0 aGUgcG9zaXRpb24gYWdhaW5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