git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] mailinfo: don't decode invalid =XY quoted-printable sequences

From
Jeff King <peff@peff.net>
Date
Sep 25, 2017, 12:28 UTC
Message-ID
<20170925122844.lwzwtp2u4dhgijrd@sigill.intra.peff.net>
In-Reply-To
<d48b3d67-5f03-19f3-5a32-ec7e8397c98d@web.de>
On Sat, Sep 23, 2017 at 08:04:40PM +0200, René Scharfe wrote:
> Decode =XY in quoted-printable segments only if X and Y are hexadecimal
> digits, otherwise just copy them.  That's at least better than
> interpreting negative results from hexval() as a character.
Thanks, this looks good to me overall.

I wondered if we should die() here, but walking over cruft may be more friendly. The base64 case does the same, though it actually ignores the bytes rather than copying them. Since this is never _supposed_ to happen, it's hard to say what behavior would be preferable without seeing a real-world broken case.

-Peff
Previous: René Scharfe
Message 3 of 3 in “mailinfo: don't decode invalid =XY quoted-printable sequences”
  1. mailinfo: don't decode invalid =XY quoted-printable sequencesRené Scharfe, Sep 23, 2017
  2. René ScharfeSep 23, 2017
  3. Jeff KingSep 25, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.