unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>, 10536@debbugs.gnu.org
Subject: bug#10536: 23.3; Make base64-decode more fault tolerant
Date: Tue, 17 Apr 2018 22:25:06 -0400	[thread overview]
Message-ID: <87bmehtfnh.fsf@gmail.com> (raw)
In-Reply-To: <874lk9fp71.fsf@mouse.gnus.org> (Lars Ingebrigtsen's message of "Wed, 18 Apr 2018 00:22:42 +0200")

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Wolfram Gloger <wmglo@dent.med.uni-muenchen.de> writes:

>> there was a missing padding character, i.e. the last quartet was
>> "xy=" rather than the proper "xy==".
>>
>> I would suggest that base64-decode should tolerate this, like with
>> the appended patch.

>>        if (c == '=')
>>  	{
>> -	  READ_QUADRUPLET_BYTE (-1);
>> +	  /* Be tolerant against missing final padding '='.  */
>> +	  READ_QUADRUPLET_BYTE (e-to);

> What do the rest of you people think?  (I think I'm slightly for
> applying the patch.  "Be liberal in what you receive" and all that.)

Makes sense to me.





  reply	other threads:[~2018-04-18  2:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-17 14:39 bug#10536: 23.3; Make base64-decode more fault tolerant Wolfram Gloger
2018-04-17 22:22 ` Lars Ingebrigtsen
2018-04-18  2:25   ` Noam Postavsky [this message]
2018-04-18  6:20   ` Eli Zaretskii
2018-04-18  9:42     ` Robert Pluim
2018-04-18  9:48       ` Eli Zaretskii
2018-04-18 11:40     ` Lars Ingebrigtsen
2019-06-27 15:42 ` Lars Ingebrigtsen
2019-06-27 17:16   ` Noam Postavsky
2019-06-27 17:22     ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bmehtfnh.fsf@gmail.com \
    --to=npostavs@gmail.com \
    --cc=10536@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=wmglo@dent.med.uni-muenchen.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).