From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Juanma Barranquero" Newsgroups: gmane.emacs.bugs Subject: bug#870: Repeatable instance of bug#870 Date: Mon, 5 Jan 2009 12:12:48 +0100 Message-ID: References: <4961E7F7.2000509@gnu.org> Reply-To: Juanma Barranquero , 870@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1231154640 14192 80.91.229.12 (5 Jan 2009 11:24:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 5 Jan 2009 11:24:00 +0000 (UTC) Cc: 870@emacsbugs.donarmstrong.com, Emacs Devel To: "Jason Rumney" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 05 12:25:10 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LJna1-0006RP-MU for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Jan 2009 12:25:10 +0100 Original-Received: from localhost ([127.0.0.1]:47070 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LJnYm-0004Xp-4T for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Jan 2009 06:23:52 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LJnYP-0004La-NX for bug-gnu-emacs@gnu.org; Mon, 05 Jan 2009 06:23:29 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LJnYN-0004KO-Q4 for bug-gnu-emacs@gnu.org; Mon, 05 Jan 2009 06:23:28 -0500 Original-Received: from [199.232.76.173] (port=55231 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LJnYN-0004K7-D0 for bug-gnu-emacs@gnu.org; Mon, 05 Jan 2009 06:23:27 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:53527) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LJnYM-0005oX-EK for bug-gnu-emacs@gnu.org; Mon, 05 Jan 2009 06:23:26 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n05BNNZl014999; Mon, 5 Jan 2009 03:23:23 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n05BK38Q013876; Mon, 5 Jan 2009 03:20:03 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: "Juanma Barranquero" Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs , owner@emacsbugs.donarmstrong.com Resent-Date: Mon, 05 Jan 2009 11:20:03 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 870 X-Emacs-PR-Package: emacs,w32 X-Emacs-PR-Keywords: Original-Received: via spool by 870-submit@emacsbugs.donarmstrong.com id=B870.123115397212632 (code B ref 870); Mon, 05 Jan 2009 11:20:03 +0000 Original-Received: (at 870) by emacsbugs.donarmstrong.com; 5 Jan 2009 11:12:52 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.28]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n05BCmku012626 for <870@emacsbugs.donarmstrong.com>; Mon, 5 Jan 2009 03:12:50 -0800 Original-Received: by yw-out-2324.google.com with SMTP id 3so2235226ywj.31 for <870@emacsbugs.donarmstrong.com>; Mon, 05 Jan 2009 03:12:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=oxip6dJ8Ou8OTFIYCYtmH5YMsItfPixUU0ju5X7eK3g=; b=OP+d+KRFi/ltwB32gcGGg52UeFjGAatfJ17/H/PLrqftEtMz/kxN2VlD/8ete6OkLI iKiWVP8EAzvIfnfV/VVCz3fm811ZHB12AGbfkCk/CJascfnZOegTJzFcqZY13CuqY4YA +D8hgxZZfvmdh4PpKEx7pJk21LMieRUW7dMxk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=JvZKJAiEzGiBw5d9trUzjWdScgCIkAvoeI/OwGu167W8PnZA/9uWrm9F8sYnVsIZrk i7lfBOxyYIlW+K0rIk3bIGA5PnOABa2nwTUpZRUmDQvA9zYx0DW61rT/aYZc7F5VF/eB mhuqlkrIkUDZN2Z9k7Zjr2aFD8QMA3JyXLgdc= Original-Received: by 10.100.94.14 with SMTP id r14mr10950292anb.68.1231153968181; Mon, 05 Jan 2009 03:12:48 -0800 (PST) Original-Received: by 10.100.252.15 with HTTP; Mon, 5 Jan 2009 03:12:48 -0800 (PST) In-Reply-To: <4961E7F7.2000509@gnu.org> Content-Disposition: inline X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Mon, 05 Jan 2009 06:23:28 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:23785 Archived-At: On Mon, Jan 5, 2009 at 11:59, Jason Rumney wrote: > It appears that there is a bug in all the decode_coding_* functions when a > CR lies on a CHARBUF_SIZE (0x4000) boundary with a matching LF on the other > side of the boundary. > > They all do something like: > > if (eol_crlf && c1 == '\r') > ONE_MORE_BYTE (byte_after_cr); > > but ONE_MORE_BYTE will abort the decode if it reaches the end of the buffer, > leaving the CR in limbo between having been read and being added to the > buffer. Then on decoding the subsequent block, the initial LF does not trip > the normal CRLF decoding, so it is put into the buffer. Wouldn't that mean that, on writing the buffer, the file would end with extra CRs, instead of missing LFs? Juanma