From unknown Fri Aug 15 21:27:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#7165: 24.0.50; rmail error "Invalid base64 data" Resent-From: Kenichi Handa Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Oct 2010 07:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 7165 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 7165@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.128634983710068 (code B ref -1); Wed, 06 Oct 2010 07:24:02 +0000 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 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-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 unknown Fri Aug 15 21:27:41 2025 X-Loop: help-debbugs@gnu.org Subject: bug#7165: 24.0.50; rmail error "Invalid base64 data" In-Reply-To: Resent-From: Glenn Morris Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Oct 2010 01:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7165 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Kenichi Handa Cc: 7165@debbugs.gnu.org Received: via spool by 7165-submit@debbugs.gnu.org id=B7165.128658675931202 (code B ref 7165); Sat, 09 Oct 2010 01:13:01 +0000 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 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-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-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 unknown Fri Aug 15 21:27:41 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Kenichi Handa Subject: bug#7165: closed (Re: bug#7165: 24.0.50; rmail error "Invalid base64 data") Message-ID: References: X-Gnu-PR-Message: they-closed 7165 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 7165@debbugs.gnu.org Date: Thu, 14 Oct 2010 04:25:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1287030302-10872-1" This is a multi-part message in MIME format... ------------=_1287030302-10872-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #7165: 24.0.50; rmail error "Invalid base64 data" which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 7165@debbugs.gnu.org. --=20 7165: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D7165 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1287030302-10872-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit 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 ------------=_1287030302-10872-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit 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 ------------=_1287030302-10872-1--