From unknown Thu Aug 14 17:27:15 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#7165 <7165@debbugs.gnu.org> To: bug#7165 <7165@debbugs.gnu.org> Subject: Status: 24.0.50; rmail error "Invalid base64 data" Reply-To: bug#7165 <7165@debbugs.gnu.org> Date: Fri, 15 Aug 2025 00:27:15 +0000 retitle 7165 24.0.50; rmail error "Invalid base64 data" reassign 7165 emacs submitter 7165 Kenichi Handa severity 7165 normal tag 7165 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 06 03:23:57 2010 Received: (at submit) by debbugs.gnu.org; 6 Oct 2010 07:23:57 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P3OM1-0002cL-9L for submit@debbugs.gnu.org; Wed, 06 Oct 2010 03:23:57 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P3OLz-0002cG-AY for submit@debbugs.gnu.org; Wed, 06 Oct 2010 03:23:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P3OOy-0007Cp-Ix for submit@debbugs.gnu.org; Wed, 06 Oct 2010 03:27:06 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:55957) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P3OOy-0007Cc-Ga for submit@debbugs.gnu.org; Wed, 06 Oct 2010 03:27:00 -0400 Received: from [140.186.70.92] (port=32771 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P3OOq-0003bD-Hu for bug-gnu-emacs@gnu.org; Wed, 06 Oct 2010 03:27:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P3OOd-00076l-SU for bug-gnu-emacs@gnu.org; Wed, 06 Oct 2010 03:26:51 -0400 Received: from mx1.aist.go.jp ([150.29.246.133]:61271) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P3OOd-000759-Cm for bug-gnu-emacs@gnu.org; Wed, 06 Oct 2010 03:26:39 -0400 Received: from rqsmtp1.aist.go.jp (rqsmtp1.aist.go.jp [150.29.254.115]) by mx1.aist.go.jp with ESMTP id o967QX0J027495 for ; Wed, 6 Oct 2010 16:26:33 +0900 (JST) env-from (handa@m17n.org) Received: from smtp1.aist.go.jp by rqsmtp1.aist.go.jp with ESMTP id o967QXN5026742 for ; Wed, 6 Oct 2010 16:26:33 +0900 (JST) env-from (handa@m17n.org) Received: by smtp1.aist.go.jp with ESMTP id o967QXHB022957 for ; Wed, 6 Oct 2010 16:26:33 +0900 (JST) env-from (handa@m17n.org) Received: from handa by etlken with local (Exim 4.71) (envelope-from ) id 1P3OOW-0006kT-TT for bug-gnu-emacs@gnu.org; Wed, 06 Oct 2010 16:26:32 +0900 From: Kenichi Handa To: bug-gnu-emacs@gnu.org Subject: 24.0.50; rmail error "Invalid base64 data" Date: Wed, 06 Oct 2010 16:26:32 +0900 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Solaris 9 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.7 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.7 (----) While reading mails by rmail, I encountered "Invalid base64 data" error, and couldn't delete the message causing that error. This bug is very similar to bug#5441. But unlike mail-unquote-printable-region, base64-decode-region doesn't have NOERROR arg and we have to use condition-case. I suggest this patch (to emacs-23). === modified file 'lisp/mail/rmail.el' --- lisp/mail/rmail.el 2010-08-20 07:11:35 +0000 +++ lisp/mail/rmail.el 2010-10-06 07:22:53 +0000 @@ -2742,7 +2742,9 @@ nil t 'unibyte) (message "Malformed MIME quoted-printable message"))) ((and (string= character-coding "base64") is-text-message) - (base64-decode-region (point-min) (point-max))) + (condition-case err + (base64-decode-region (point-min) (point-max)) + (error (message "%s" (cdr err))))) ((eq character-coding 'uuencode) (error "uuencoded messages are not supported yet")) (t)) --- Kenichi Handa handa@m17n.org From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 08 21:12:39 2010 Received: (at 7165) by debbugs.gnu.org; 9 Oct 2010 01:12:39 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P4NzL-00087D-If for submit@debbugs.gnu.org; Fri, 08 Oct 2010 21:12:39 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P4NzJ-000878-Mh for 7165@debbugs.gnu.org; Fri, 08 Oct 2010 21:12:38 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1P4O2U-0007yS-SR; Fri, 08 Oct 2010 21:15:54 -0400 To: Kenichi Handa Subject: Re: bug#7165: 24.0.50; rmail error "Invalid base64 data" References: From: Glenn Morris X-Spook: Capricorn Attorney General mindwar cryptographic ICE X-Ran: &1IO`?rj"4Q1/PbeGd{"s(A0QW*3-OWX-nQf2-au`66#,2gb(|C|S)GILq(&Hw"&-ag&hQ X-Hue: yellow X-Debbugs-No-Ack: yes X-Attribution: GM Date: Fri, 08 Oct 2010 21:15:54 -0400 Message-ID: <1c62xcgo8l.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.2 (------) X-Debbugs-Envelope-To: 7165 Cc: 7165@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.2 (------) Kenichi Handa wrote: > I suggest this patch (to emacs-23). If you are looking for feedback, this looks good to me. > === modified file 'lisp/mail/rmail.el' > --- lisp/mail/rmail.el 2010-08-20 07:11:35 +0000 > +++ lisp/mail/rmail.el 2010-10-06 07:22:53 +0000 > @@ -2742,7 +2742,9 @@ > nil t 'unibyte) > (message "Malformed MIME quoted-printable message"))) > ((and (string= character-coding "base64") is-text-message) > - (base64-decode-region (point-min) (point-max))) > + (condition-case err > + (base64-decode-region (point-min) (point-max)) > + (error (message "%s" (cdr err))))) > ((eq character-coding 'uuencode) > (error "uuencoded messages are not supported yet")) > (t)) From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 14 00:24:52 2010 Received: (at 7165-done) by debbugs.gnu.org; 14 Oct 2010 04:24:52 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P6FN6-0002pB-Cc for submit@debbugs.gnu.org; Thu, 14 Oct 2010 00:24:52 -0400 Received: from mx1.aist.go.jp ([150.29.246.133]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P6FN3-0002p4-2b for 7165-done@debbugs.gnu.org; Thu, 14 Oct 2010 00:24:50 -0400 Received: from rqsmtp2.aist.go.jp (rqsmtp2.aist.go.jp [150.29.254.123]) by mx1.aist.go.jp with ESMTP id o9E4SJSQ010576; Thu, 14 Oct 2010 13:28:19 +0900 (JST) env-from (handa@m17n.org) Received: from smtp2.aist.go.jp by rqsmtp2.aist.go.jp with ESMTP id o9E4SIcd016882; Thu, 14 Oct 2010 13:28:18 +0900 (JST) env-from (handa@m17n.org) Received: by smtp2.aist.go.jp with ESMTP id o9E4SI0X022491; Thu, 14 Oct 2010 13:28:18 +0900 (JST) env-from (handa@m17n.org) Received: from handa by etlken with local (Exim 4.71) (envelope-from ) id 1P6FQQ-0003nD-1q; Thu, 14 Oct 2010 13:28:18 +0900 From: Kenichi Handa To: Glenn Morris Subject: Re: bug#7165: 24.0.50; rmail error "Invalid base64 data" In-Reply-To: <1c62xcgo8l.fsf@fencepost.gnu.org> (message from Glenn Morris on Fri, 08 Oct 2010 21:15:54 -0400) References: <1c62xcgo8l.fsf@fencepost.gnu.org> Date: Thu, 14 Oct 2010 13:28:17 +0900 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 7165-done Cc: 7165-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) In article <1c62xcgo8l.fsf@fencepost.gnu.org>, Glenn Morris writes: > Kenichi Handa wrote: > > I suggest this patch (to emacs-23). > If you are looking for feedback, this looks good to me. Thank you for verifying it. I've just committed it to emacs-23. > > === modified file 'lisp/mail/rmail.el' > > --- lisp/mail/rmail.el 2010-08-20 07:11:35 +0000 > > +++ lisp/mail/rmail.el 2010-10-06 07:22:53 +0000 > > @@ -2742,7 +2742,9 @@ > > nil t 'unibyte) > > (message "Malformed MIME quoted-printable message"))) > > ((and (string= character-coding "base64") is-text-message) > > - (base64-decode-region (point-min) (point-max))) > > + (condition-case err > > + (base64-decode-region (point-min) (point-max)) > > + (error (message "%s" (cdr err))))) > > ((eq character-coding 'uuencode) > > (error "uuencoded messages are not supported yet")) > > (t)) --- Kenichi Handa handa@m17n.org From unknown Thu Aug 14 17:27:15 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 11 Nov 2010 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator