From unknown Mon Jun 23 02:24:33 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#1809: 23.0.60; epa-encrypt-file corrupts files Reply-To: Juri Linkov , 1809@debbugs.gnu.org Resent-From: Juri Linkov Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Tue, 06 Jan 2009 17:55:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: report 1809 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.123126394522924 (code B ref -1); Tue, 06 Jan 2009 17:55:03 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 6 Jan 2009 17:45:45 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.1 required=4.0 tests=FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n06Hjgl3022915 for ; Tue, 6 Jan 2009 09:45:43 -0800 Received: from mx10.gnu.org ([199.232.76.166]:48445) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1LKFyg-0006bO-Ly for emacs-pretest-bug@gnu.org; Tue, 06 Jan 2009 12:44:30 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1LKFzn-0001Rn-La for emacs-pretest-bug@gnu.org; Tue, 06 Jan 2009 12:45:40 -0500 Received: from relay01.kiev.sovam.com ([62.64.120.200]:1647) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LKFzn-0001RF-4x for emacs-pretest-bug@gnu.org; Tue, 06 Jan 2009 12:45:39 -0500 Received: from [83.170.232.243] (helo=smtp.svitonline.com) by relay01.kiev.sovam.com with esmtp (Exim 4.67) (envelope-from ) id 1LKFzm-0004i9-LM for emacs-pretest-bug@gnu.org; Tue, 06 Jan 2009 19:45:38 +0200 From: Juri Linkov To: emacs-pretest-bug@gnu.org Organization: JURTA Date: Tue, 06 Jan 2009 19:32:12 +0200 Message-ID: <87eizgxrn8.fsf@jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Scanner-Signature: d0b3bc0b24c4067239780ad28ae5b444 X-DrWeb-checked: yes X-SpamTest-Envelope-From: juri@jurta.org X-SpamTest-Group-ID: 00000000 X-SpamTest-Header: Trusted X-SpamTest-Info: Profiles 6669 [Jan 06 2009] X-SpamTest-Info: {received from trusted relay: common white list} X-SpamTest-Info: {HEADERS: header Content-Type found without required header Content-Transfer-Encoding} X-SpamTest-Method: white ip list X-SpamTest-Rate: 10 X-SpamTest-Status: Trusted X-SpamTest-Status-Extended: trusted X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0278], KAS30/Release X-detected-operating-system: by monty-python.gnu.org: FreeBSD 4.8-5.1 (or MacOS X 10.2-10.3) Test case: 1. Create a file `test' with the following 3 lines: Test. Test2. Test3. 2. Save it. 3. Call `epa-encrypt-file' to encrypt it with no key using symmetric encryption giving the password "test". 4. Visit the file `test.gpg' using the password "test". 5. The decoded buffer has the corrupted content: ^@est. Test2. Test3. where ^@ is a NULL control character. GNU Emacs 23.0.60 (x86_64-pc-linux-gnu) of 2009-01-06 -- Juri Linkov http://www.jurta.org/emacs/ From unknown Mon Jun 23 02:24:33 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#1809: decode-coding-inserted-region corrupts files Reply-To: Juri Linkov , 1809@debbugs.gnu.org Resent-From: Juri Linkov Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 15 Jan 2009 01:40:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 1809 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.123198306032376 (code B ref -1); Thu, 15 Jan 2009 01:40:04 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 15 Jan 2009 01:31:00 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-1.4 required=4.0 tests=FOURLA,HAS_BUG_NUMBER, PHONENUMBER autolearn=unavailable version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0F1Uvuk032365 for ; Wed, 14 Jan 2009 17:30:58 -0800 Received: from mail.gnu.org ([199.232.76.166]:39532 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1LNH39-0002aJ-EW for emacs-pretest-bug@gnu.org; Wed, 14 Jan 2009 20:29:35 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1LNH4S-0006BV-0G for emacs-pretest-bug@gnu.org; Wed, 14 Jan 2009 20:30:56 -0500 Received: from relay01.kiev.sovam.com ([62.64.120.200]:2498) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LNH4R-0006BF-Dn for emacs-pretest-bug@gnu.org; Wed, 14 Jan 2009 20:30:55 -0500 Received: from [83.170.232.243] (helo=smtp.svitonline.com) by relay01.kiev.sovam.com with esmtp (Exim 4.69) (envelope-from ) id 1LNH4P-0009QI-CD; Thu, 15 Jan 2009 03:30:53 +0200 From: Juri Linkov To: 1809@debbugs.gnu.org Cc: emacs-pretest-bug@gnu.org Organization: JURTA References: <87eizgxrn8.fsf@jurta.org> Date: Thu, 15 Jan 2009 03:12:17 +0200 In-Reply-To: <87eizgxrn8.fsf@jurta.org> (Juri Linkov's message of "Tue, 06 Jan 2009 19:32:12 +0200") Message-ID: <87vdsh1hyu.fsf@jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Scanner-Signature: 068dd79c68aafbc760c35e97c5d420ed X-DrWeb-checked: yes X-detected-operating-system: by monty-python.gnu.org: FreeBSD 4.8-5.1 (or MacOS X 10.2-10.3) Below is a shorter test case simplified from `epa-file-decode-and-insert': 1. emacs -Q 2. Evaluate (progn (switch-to-buffer "test") (insert "Test.\nTest2.\nTest3.\n") (decode-coding-inserted-region (point-min) (point-max) "/tmp/test" t nil nil nil)) 3. The first character becomes the NULL control character: ^@est. Test2. Test3. -- Juri Linkov http://www.jurta.org/emacs/ From unknown Mon Jun 23 02:24:33 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#1809: decode-coding-inserted-region corrupts files Reply-To: "Juanma Barranquero" , 1809@debbugs.gnu.org Resent-From: "Juanma Barranquero" Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 15 Jan 2009 02:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 1809 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 1809-submit@emacsbugs.donarmstrong.com id=B1809.123198723217562 (code B ref 1809); Thu, 15 Jan 2009 02:50:02 +0000 Received: (at 1809) by emacsbugs.donarmstrong.com; 15 Jan 2009 02:40:32 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-1.5 required=4.0 tests=HAS_BUG_NUMBER,PHONENUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail-bw0-f11.google.com (mail-bw0-f11.google.com [209.85.218.11]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0F2eS8u017556 for <1809@emacsbugs.donarmstrong.com>; Wed, 14 Jan 2009 18:40:30 -0800 Received: by bwz4 with SMTP id 4so2705422bwz.1 for <1809@emacsbugs.donarmstrong.com>; Wed, 14 Jan 2009 18:40:22 -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=NgvlEskZKTpesLjubbcB1zcIBOijNsTXawF/bMp1Zt0=; b=gFyPIhH9iCv5o0ZSt/lgMMYlzce99CT+bU4jcHka9Fr5G1ViO7PEXImWXw+Zw2zs29 saRQBDpGFNVQxlArKD8oxBEiiQFQxnHsZFABTQSLBGmxkHPKC+un55L8X3SfEuC1gn9H PcxppGYuw4wW+VlH0Oym2Lpvo8c6TsPOZL2cg= 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=KYeouiwjHtGG/Q37NNnsi51BMOZHadstpQGijfL4BxnXuzDEI5qjXowlF0rb8jTKsq 9ChluDLBTyBMs7IaKDb+r9Uku5fQTs3UmG5b4Qv/sq75bPK9z4f+D42FgjTUTYGSDcwJ NuXarj3NCnCnkEKkrm+gU50CyHXWQFXVpboPM= Received: by 10.223.111.211 with SMTP id t19mr997332fap.64.1231987222737; Wed, 14 Jan 2009 18:40:22 -0800 (PST) Received: by 10.223.115.79 with HTTP; Wed, 14 Jan 2009 18:40:22 -0800 (PST) Message-ID: Date: Thu, 15 Jan 2009 03:40:22 +0100 From: "Juanma Barranquero" To: "Juri Linkov" Cc: 1809@debbugs.gnu.org In-Reply-To: <87vdsh1hyu.fsf@jurta.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <87eizgxrn8.fsf@jurta.org> <87vdsh1hyu.fsf@jurta.org> On Thu, Jan 15, 2009 at 02:12, Juri Linkov wrote: > (progn > (switch-to-buffer "test") > (insert "Test.\nTest2.\nTest3.\n") > (decode-coding-inserted-region > (point-min) (point-max) "/tmp/test" t nil nil nil)) (with-temp-buffer (insert (make-string 20 ?.)) (decode-coding-region 1 (point-max) 'raw-text) (buffer-string)) => "^@..................." It only happens for a string of length 20 bytes. Juanma From unknown Mon Jun 23 02:24:33 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#1809: decode-coding-inserted-region corrupts files Reply-To: Juri Linkov , 1809@debbugs.gnu.org Resent-From: Juri Linkov Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 15 Jan 2009 23:15:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 1809 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 1809-submit@emacsbugs.donarmstrong.com id=B1809.123206097422233 (code B ref 1809); Thu, 15 Jan 2009 23:15:05 +0000 Received: (at 1809) by emacsbugs.donarmstrong.com; 15 Jan 2009 23:09:34 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-1.5 required=4.0 tests=HAS_BUG_NUMBER,PHONENUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from relay03.kiev.sovam.com (relay03.kiev.sovam.com [62.64.120.201]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0FN9Uxs022206 for <1809@emacsbugs.donarmstrong.com>; Thu, 15 Jan 2009 15:09:31 -0800 Received: from [83.170.232.243] (helo=smtp.svitonline.com) by relay03.kiev.sovam.com with esmtp (Exim 4.69) (envelope-from ) id 1LNbL7-000GGo-7D; Fri, 16 Jan 2009 01:09:29 +0200 From: Juri Linkov To: "Juanma Barranquero" Cc: 1809@debbugs.gnu.org Organization: JURTA References: <87eizgxrn8.fsf@jurta.org> <87vdsh1hyu.fsf@jurta.org> Date: Fri, 16 Jan 2009 01:02:38 +0200 In-Reply-To: (Juanma Barranquero's message of "Thu, 15 Jan 2009 03:40:22 +0100") Message-ID: <87ab9sdvg1.fsf@jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Scanner-Signature: 068dd79c68aafbc760c35e97c5d420ed X-DrWeb-checked: yes >> (progn >> (switch-to-buffer "test") >> (insert "Test.\nTest2.\nTest3.\n") >> (decode-coding-inserted-region >> (point-min) (point-max) "/tmp/test" t nil nil nil)) > > (with-temp-buffer > (insert (make-string 20 ?.)) > (decode-coding-region 1 (point-max) 'raw-text) > (buffer-string)) > > => "^@..................." > > It only happens for a string of length 20 bytes. Does this mean I was lucky discovering the exact length where the bug manifests itself? -- Juri Linkov http://www.jurta.org/emacs/ From unknown Mon Jun 23 02:24:33 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#1809: decode-coding-inserted-region corrupts files Reply-To: Juanma Barranquero , 1809@debbugs.gnu.org Resent-From: Juanma Barranquero Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 15 Jan 2009 23:40:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 1809 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 1809-submit@emacsbugs.donarmstrong.com id=B1809.123206252930748 (code B ref 1809); Thu, 15 Jan 2009 23:40:04 +0000 Received: (at 1809) by emacsbugs.donarmstrong.com; 15 Jan 2009 23:35:29 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.5 required=4.0 tests=HAS_BUG_NUMBER, IMPRONONCABLE_2,PHONENUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail-ew0-f21.google.com (mail-ew0-f21.google.com [209.85.219.21]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0FNZP8a030724 for <1809@emacsbugs.donarmstrong.com>; Thu, 15 Jan 2009 15:35:26 -0800 Received: by ewy14 with SMTP id 14so2772866ewy.1 for <1809@emacsbugs.donarmstrong.com>; Thu, 15 Jan 2009 15:35:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=h3upQOGBV9gwYlLFfBAL7z5sboJyAo5VDsLW1cgQU3Y=; b=Own27Ys0kwZSDmrRQU5O/amL6ER+WKxXKC2PghmE01u8MUPR1GqO8ZwaYf8Zup//8c tZK4PwRK0lthRgDI3cdH8cLACHYjNh7shap5/KJgMxQao3RBWCUYHYd6No9LiDcSvKGI 7pk9AzQIcN2xdjfGP9qK0S8OrJl9YioaWVKAU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=tZBazW/ZtLXBHZaCObBJjt09aV9Fhzjzr1cRRw63ds3enw8nfYhFtRFAcBUef40XgU 2jgGL1H5hyK4rfsKn0OWEM07ncN+xb4ugPuw78RyHxkpF6/BVPtkUjiJqhAIXdrqoPtb vT8SI1W7HC9W7ikeLkGC5V91JUsM0S3lFGLNA= MIME-Version: 1.0 Received: by 10.210.38.5 with SMTP id l5mr2347072ebl.112.1232062519455; Thu, 15 Jan 2009 15:35:19 -0800 (PST) In-Reply-To: <87ab9sdvg1.fsf@jurta.org> References: <87eizgxrn8.fsf@jurta.org> <87vdsh1hyu.fsf@jurta.org> <87ab9sdvg1.fsf@jurta.org> Date: Fri, 16 Jan 2009 00:35:19 +0100 Message-ID: From: Juanma Barranquero To: Juri Linkov Cc: 1809@debbugs.gnu.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Fri, Jan 16, 2009 at 00:02, Juri Linkov wrote: >> It only happens for a string of length 20 bytes. > > Does this mean I was lucky discovering the exact length where the bug > manifests itself? Yes, at least up to 10,000 :-) For extra fun, you can try with length =3D 10 and multibyte chars like =C3= =A1, =C3=A7 or =C3=B1. BTW, testing this I triggered an assertion failure, but it was on redisplay_code and likely unrelated. Juanma xdisp.c: 6066 =3D> xassert (IT_BYTEPOS (*it) =3D=3D CHAR_TO_BYTE (IT_CHARPO= S (*it))); #0 0x7c91120f in ntdll!DbgUiConnectToDbg () from C:\WINDOWS\system32\ntdll= .dll #1 0x011ff651 in w32_abort () at w32fns.c:7295 #2 0x010313b7 in set_iterator_to_next (it=3D0x82dc74, reseat_p=3D1) at xdi= sp.c:6066 #3 0x0103144e in set_iterator_to_next (it=3D0x82dc74, reseat_p=3D1) at xdi= sp.c:6113 #4 0x0103bd55 in display_line (it=3D0x82dc74) at xdisp.c:16926 #5 0x01040694 in try_window (window=3D67652100, pos=3D{charpos =3D 1, bytepos =3D 1}, check_margins=3D1) at xdisp.c:14054 #6 0x01054dc7 in redisplay_window (window=3D67652100, just_this_one_p=3D1) at xdisp.c:13677 #7 0x01056f79 in redisplay_window_1 (window=3D67652100) at xdisp.c:12281 #8 0x010190f1 in internal_condition_case_1 (bfun=3D0x1056f53 , arg=3D67652100, handlers=3D47871253, hfun=3D0x1023ce8 ) at eval.c:1559 #9 0x01048077 in redisplay_internal (preserve_echo_area=3D) at xdisp.c:11899 #10 0x0108ebdb in read_char (commandflag=3D1, nmaps=3D6, maps=3D0x82fb50, prev_event=3D47888385, used_mouse_menu=3D0x82fc24, end_time=3D0x0) at keyboard.c:2666 #11 0x0109327a in read_key_sequence (keybuf=3D0x82fcc4, bufsize=3D30, prompt=3D47888385, dont_downcase_last=3D0, can_return_switch_frame=3D1, fix_current_buffer=3D1) at keyboard.c:9365 #12 0x010963d1 in command_loop_1 () at keyboard.c:1631 #13 0x01019376 in internal_condition_case (bfun=3D0x1096143 , handlers=3D47952065, hfun=3D0x108d371 ) at eval.c:1511 #14 0x0108c802 in command_loop_2 () at keyboard.c:1348 #15 0x01019420 in internal_catch (tag=3D47948185, func=3D0x108c7df , arg=3D47888385) at eval.c:1247 #16 0x0108d1b2 in command_loop () at keyboard.c:1327 #17 0x0108d509 in recursive_edit_1 () at keyboard.c:942 #18 0x0108d675 in Frecursive_edit () at keyboard.c:1004 #19 0x01002fb1 in main (argc=3D2, argv=3D0xa93cf8) at emacs.c:1786 From lekktu@gmail.com Sat Feb 21 21:44:45 2009 Received: (at control) by emacsbugs.donarmstrong.com; 22 Feb 2009 05:44:45 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-1.5 required=4.0 tests=HAS_BUG_NUMBER,PHONENUMBER autolearn=unavailable version=3.2.5-bugs.debian.org_2005_01_02 Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.186]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n1M5iZ1e026265; Sat, 21 Feb 2009 21:44:37 -0800 Received: by nf-out-0910.google.com with SMTP id g16so238037nfd.31 for ; Sat, 21 Feb 2009 21:44:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=HDBduujd/9yLlDjtxPIYWQ3dKugNMH5T/lrWjc8hUAs=; b=htAG3eIzRgBlSfC9kU1yaOAIBV6Xea9tZ+gEl44vC+8WMXw7X4GVZig0HjvRzCDCDI QPOVhcov4hMPqXk4wyTvPuipFaCSfjaSTqXTM8pb1EQW435LGQHtl8KsNaaG5A7J0TrH emix9O5xhR31bT9fmBEU252l6AR/OEFboiWGg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=vBNFd3p0iuzQRSdV4g2scgdY9guNYA87LDsPR54eHDZHFHidF0Cy+C+saZdsHWeFGw DpkgHPLsRLFNRDpwY74ztspRxcBkOK0HvhYiqW431nc3U4u10rxNxqlhyWswI8ky0Sws DXmysuWHrPoJimpO3h8M8iuM6xLozgDGPN/o8= MIME-Version: 1.0 Received: by 10.210.38.5 with SMTP id l5mr2238628ebl.49.1235281475300; Sat, 21 Feb 2009 21:44:35 -0800 (PST) In-Reply-To: References: <499f1cdd.050cc00a.4267.ffffc0ce@mx.google.com> Date: Sun, 22 Feb 2009 06:44:35 +0100 Message-ID: Subject: Re: bug#2416: 23.0.60; decode-coding-region From: Juanma Barranquero To: MJ Cc: 2416@debbugs.gnu.org, Chong Yidong , Eli Zaretskii , control@debbugs.gnu.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit merge 1809 2416 quit > Indeed, including newline, the buffer length is exactly 20 bytes in two > cases where they are ascii. In another case, it's BIG5 Chinese (each BIG5 > code is two bytes), and the total is also 20 bytes. Thanks for pointing it > out. OK, so this is #1809 then. I'm merging the bugs. Juanma From lekktu@gmail.com Sun Feb 22 04:54:10 2009 Received: (at control) by emacsbugs.donarmstrong.com; 22 Feb 2009 12:54:10 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: * X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=1.5 required=4.0 tests=PHONENUMBER autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail-ew0-f176.google.com (mail-ew0-f176.google.com [209.85.219.176]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n1MCs6b9004663 for ; Sun, 22 Feb 2009 04:54:08 -0800 Received: by ewy24 with SMTP id 24so29040ewy.1 for ; Sun, 22 Feb 2009 04:54:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=uIj/4OQwaQFiAS1hcQGF/ERcwQ0lDFeICzh2i+VOFLk=; b=wyv1CNAHL3NBdSd2+IiijLby1q44Z+5fgYSg3ctz8dkv5/Aeux17OREDKWQ4Tfi0QM W14rxgOe03jbKMqX3Fi0OjV6/J7M1w+FLheAEwsmvTAsGDX1SuVabIlXyZINiAmkg3tO P+D6Nvl7aZ5J3iJBK7AICXn/KDJdv3+tRs7UU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=lLkByE2RZFs/ZAKCt48MiTYXGmT8tERFX9QEDvIAvbMPM9mLKYgDa0VTSJ9cPJtcej lYnrn3QTzTQdNY+PWof3VC7bBUc28Wi63QJOx0AsewGGNqSDHRlU+kEAdtM3PDPsZ3YH QunhiEV7HR3LfxvowwiY85x+o0sK8C9fDe2MU= MIME-Version: 1.0 Received: by 10.210.59.14 with SMTP id h14mr2483497eba.182.1235307241045; Sun, 22 Feb 2009 04:54:01 -0800 (PST) In-Reply-To: References: Date: Sun, 22 Feb 2009 13:54:00 +0100 Message-ID: Subject: Re: Processed (with 1 errors): your mail From: Juanma Barranquero To: control@debbugs.gnu.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-CrossAssassin-Score: 2 retitle 1809 decode-coding-inserted-region corrupts files quit From unknown Mon Jun 23 02:24:33 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.420 (Entity 5.420) X-Loop: owner@emacsbugs.donarmstrong.com From: help-debbugs@gnu.org (Emacs bug Tracking System) To: Juri Linkov Subject: bug#1809 closed by Chong Yidong (Re: bug#1809: decode-coding-inserted-region corrupts files) Message-ID: References: <87eixqz6bc.fsf@cyd.mit.edu> <87eizgxrn8.fsf@jurta.org> X-Emacs-PR-Message: they-closed 1809 X-Emacs-PR-Package: emacs Reply-To: 1809@debbugs.gnu.org Date: Sun, 22 Feb 2009 18:20:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1235326803-22187-1" This is a multi-part message in MIME format... ------------=_1235326803-22187-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is an automatic notification regarding your bug report which was filed against the emacs package: #1809: decode-coding-inserted-region corrupts files It has been closed by Chong Yidong . Their explanation is attached below along with your original report. If this explanation is unsatisfactory and you have not received a better one in a separate message then please contact Chong Yidong by replying to this email. --=20 1809: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D1809 Emacs Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1235326803-22187-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 1809-done) by emacsbugs.donarmstrong.com; 22 Feb 2009 18:14:40 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-1.5 required=4.0 tests=HAS_BUG_NUMBER,PHONENUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n1MIEbQj020957 for <1809-done@emacsbugs.donarmstrong.com>; Sun, 22 Feb 2009 10:14:38 -0800 Received: by cyd.mit.edu (Postfix, from userid 1000) id 603A857E211; Sun, 22 Feb 2009 13:15:35 -0500 (EST) From: Chong Yidong To: Andreas Schwab Cc: Juri Linkov , mj , Juanma Barranquero , 1809-done@debbugs.gnu.org Subject: Re: bug#1809: decode-coding-inserted-region corrupts files Date: Sun, 22 Feb 2009 13:15:35 -0500 Message-ID: <87eixqz6bc.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > 2009-02-22 Andreas Schwab > > * insdel.c (del_range_2): Don't modify gap contents when > called from decode_coding_object. (Bug#1809) Thanks for fixing this bug. ------------=_1235326803-22187-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by emacsbugs.donarmstrong.com; 6 Jan 2009 17:45:45 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.1 required=4.0 tests=FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n06Hjgl3022915 for ; Tue, 6 Jan 2009 09:45:43 -0800 Received: from mx10.gnu.org ([199.232.76.166]:48445) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1LKFyg-0006bO-Ly for emacs-pretest-bug@gnu.org; Tue, 06 Jan 2009 12:44:30 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1LKFzn-0001Rn-La for emacs-pretest-bug@gnu.org; Tue, 06 Jan 2009 12:45:40 -0500 Received: from relay01.kiev.sovam.com ([62.64.120.200]:1647) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LKFzn-0001RF-4x for emacs-pretest-bug@gnu.org; Tue, 06 Jan 2009 12:45:39 -0500 Received: from [83.170.232.243] (helo=smtp.svitonline.com) by relay01.kiev.sovam.com with esmtp (Exim 4.67) (envelope-from ) id 1LKFzm-0004i9-LM for emacs-pretest-bug@gnu.org; Tue, 06 Jan 2009 19:45:38 +0200 From: Juri Linkov To: emacs-pretest-bug@gnu.org Subject: 23.0.60; epa-encrypt-file corrupts files Organization: JURTA Date: Tue, 06 Jan 2009 19:32:12 +0200 Message-ID: <87eizgxrn8.fsf@jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Scanner-Signature: d0b3bc0b24c4067239780ad28ae5b444 X-DrWeb-checked: yes X-SpamTest-Envelope-From: juri@jurta.org X-SpamTest-Group-ID: 00000000 X-SpamTest-Header: Trusted X-SpamTest-Info: Profiles 6669 [Jan 06 2009] X-SpamTest-Info: {received from trusted relay: common white list} X-SpamTest-Info: {HEADERS: header Content-Type found without required header Content-Transfer-Encoding} X-SpamTest-Method: white ip list X-SpamTest-Rate: 10 X-SpamTest-Status: Trusted X-SpamTest-Status-Extended: trusted X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0278], KAS30/Release X-detected-operating-system: by monty-python.gnu.org: FreeBSD 4.8-5.1 (or MacOS X 10.2-10.3) Test case: 1. Create a file `test' with the following 3 lines: Test. Test2. Test3. 2. Save it. 3. Call `epa-encrypt-file' to encrypt it with no key using symmetric encryption giving the password "test". 4. Visit the file `test.gpg' using the password "test". 5. The decoded buffer has the corrupted content: ^@est. Test2. Test3. where ^@ is a NULL control character. GNU Emacs 23.0.60 (x86_64-pc-linux-gnu) of 2009-01-06 -- Juri Linkov http://www.jurta.org/emacs/ ------------=_1235326803-22187-1-- From unknown Mon Jun 23 02:24:33 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.420 (Entity 5.420) X-Loop: owner@emacsbugs.donarmstrong.com From: help-debbugs@gnu.org (Emacs bug Tracking System) To: mj Subject: bug#2416 closed by Chong Yidong (Re: bug#1809: decode-coding-inserted-region corrupts files) Message-ID: References: <87eixqz6bc.fsf@cyd.mit.edu> <499f1cdd.050cc00a.4267.ffffc0ce@mx.google.com> X-Emacs-PR-Message: they-closed 2416 X-Emacs-PR-Package: emacs Reply-To: 2416@debbugs.gnu.org Date: Sun, 22 Feb 2009 18:20:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1235326803-22187-3" This is a multi-part message in MIME format... ------------=_1235326803-22187-3 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is an automatic notification regarding your bug report which was filed against the emacs package: #1809: 23.0.60; decode-coding-region It has been closed by Chong Yidong . Their explanation is attached below along with your original report. If this explanation is unsatisfactory and you have not received a better one in a separate message then please contact Chong Yidong by replying to this email. --=20 1809: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D1809 Emacs Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1235326803-22187-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 1809-done) by emacsbugs.donarmstrong.com; 22 Feb 2009 18:14:40 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-1.5 required=4.0 tests=HAS_BUG_NUMBER,PHONENUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n1MIEbQj020957 for <1809-done@emacsbugs.donarmstrong.com>; Sun, 22 Feb 2009 10:14:38 -0800 Received: by cyd.mit.edu (Postfix, from userid 1000) id 603A857E211; Sun, 22 Feb 2009 13:15:35 -0500 (EST) From: Chong Yidong To: Andreas Schwab Cc: Juri Linkov , mj , Juanma Barranquero , 1809-done@debbugs.gnu.org Subject: Re: bug#1809: decode-coding-inserted-region corrupts files Date: Sun, 22 Feb 2009 13:15:35 -0500 Message-ID: <87eixqz6bc.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > 2009-02-22 Andreas Schwab > > * insdel.c (del_range_2): Don't modify gap contents when > called from decode_coding_object. (Bug#1809) Thanks for fixing this bug. ------------=_1235326803-22187-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by emacsbugs.donarmstrong.com; 20 Feb 2009 21:13:09 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.9 required=4.0 tests=FOURLA,MSGID_FROM_MTA_HEADER, MURPHY_DRUGS_REL8 autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n1KLD5B6016782 for ; Fri, 20 Feb 2009 13:13:07 -0800 Received: from mail.gnu.org ([199.232.76.166]:32834 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1Lace7-0004r6-Bq for emacs-pretest-bug@gnu.org; Fri, 20 Feb 2009 16:10:55 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1LacgC-0007Kz-0d for emacs-pretest-bug@gnu.org; Fri, 20 Feb 2009 16:13:04 -0500 Received: from mail-qy0-f20.google.com ([209.85.221.20]:58115) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LacgB-0007Kh-MI for emacs-pretest-bug@gnu.org; Fri, 20 Feb 2009 16:13:03 -0500 Received: by qyk13 with SMTP id 13so1796465qyk.18 for ; Fri, 20 Feb 2009 13:13:02 -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:sender :received:from:to:subject:x-spam-processed:x-mdremoteip :x-return-path:x-mdaemon-deliver-to; bh=YMUIBpo5rEqOH1LjhjTdSzdmAWhVBft/K5Ox5Uygmr4=; b=gqulQNdtQ8Tgkk3XhdFTaeEbUnhmT+NZ6C9EW0j/kXRM7ddTpKBy4yfiWcdfxwT11U gbR8lq6HrJaOy/LT1YAv85ONx76SfhrvOHHq8oXnGi0Sz5i+A2O16XHsXG1MEp0+OTOI B64wOjGCsPIgmYg+OzRd6HrZ1qTVl5NvVo7ms= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:sender:from:to:subject:x-spam-processed :x-mdremoteip:x-return-path:x-mdaemon-deliver-to; b=sDKmg2WVoW2n4kRm+GtHb8ToWqJ21lsyZmMIQ9Vza05lqthGGgnHMqqB8ksyJCqP/0 sHEeJ+5l5J5e+gjUBD6k4sWjh7+BQ6FAqpfiKMARb9Da7WMDN7CNJTYJI+hhuYoO2QlO 9HH597BXOz28CW9TUnUpbselVEqNFj04pHxus= Received: by 10.224.20.10 with SMTP id d10mr2243119qab.35.1235164382203; Fri, 20 Feb 2009 13:13:02 -0800 (PST) Received: from greenplace.page.us (c-68-33-70-96.hsd1.md.comcast.net [68.33.70.96]) by mx.google.com with ESMTPS id 5sm1012912ywl.28.2009.02.20.13.13.01 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 20 Feb 2009 13:13:01 -0800 (PST) Message-ID: <499f1cdd.050cc00a.4267.ffffc0ce@mx.google.com> Date: Fri, 20 Feb 2009 13:13:01 -0800 (PST) Sender: MJ Chan Received: from T42 ([127.0.0.1]) by local (greenplace.page.us [127.0.0.1]) (MDaemon.PRO.v6.8.5.R) with ESMTP id 21-md50000000001.tmp for ; Fri, 20 Feb 2009 16:12:58 -0500 From: mj To: emacs-pretest-bug@gnu.org Subject: 23.0.60; decode-coding-region X-MDRemoteIP: 127.0.0.1 X-Return-Path: mjchan.inbox@gmail.com X-MDaemon-Deliver-To: emacs-pretest-bug@gnu.org X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) I have been having this problem since I switched to Emacs 23 several weeks ago. I'm using VM to read my mails. There seems to be a problem in decode-coding-region when VM tries to decode a string. When VM tries to decode a region or a string, it uses a temporary buffer and basically runs the following lisp code: (apply 'decode-coding-region (point-min) (point-max) 'us-ascii nil) The original buffer content would be something like this: B7040400-12 some text here after decode-coding-region is executed, the buffer content became: ^@7040450-12 some text here Where ^@ is actually binary code \0 (not ascii ^ and @). There is another instance that a string was decoded and the result is ^@ prefixed. I could not reproduce this with "Emacs -Q". But it always happens when thsoe particular messages were processed by VM. Strangely enough, if I inserted a few spaces at the beginning of buffer: (one space in the following buffer) B7040400-12 some text here And, the decoding was done correctly. In another instance mentioned above, one space is not enough. I had to put several spaces to get the decoding working. I saw another bug report just yesterday regarding decode-coding-region crashing. I applied the patch, but it did not help in the decoding. Please let me know if you need other information to help understand the problem. Thanks. ----- Emacs version: "GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600) of 2009-01-29 on T42" Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (3.4) --cflags -I../../GnuWin32/include' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: ENU value of $XMODIFIERS: nil locale-coding-system: chinese-big5 default-enable-multibyte-characters: t Major mode: Shell Minor modes in effect: auto-image-file-mode: t shell-dirtrack-mode: t tooltip-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t ------------=_1235326803-22187-3--