bug-mailutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug in decodemail


From: Kurt Hackenberg
Subject: Bug in decodemail
Date: Mon, 17 Jan 2022 18:16:22 -0500

I've stumbled over a bug in decodemail: the decoded message has a
little garbage inserted in the middle.  Attached are two message files
from two maildirs, the input and output of decodemail.  In the output,
after "498 " is inserted bogus "000 001 002 003 004 005 0"

The body of the input message is a single very long line, the numbers
"000" through "999", with a space after each one, encoded as
quoted-printable to insert soft line breaks.

It kind of looks like it read some amount into a buffer, and then
wrote a little more than that, including leftovers in the buffer from
a previous read.  Or it wraps around, or something.  From my limited
testing, it looks like this only happens when decoding a message
reduces its size.  (I tested one other sample message, the same 1000
numbers, but broken into 100 lines of 10 numbers each.  That didn't
need to be encoded with quoted-printable, and showed no error.)

I've attached the message files as application/octet-stream, so
they're base64 encodings of files that each contain a message.  The
input message, when the base64 is decoded, will be a message encoded
as quoted-printable.  (I hope.)

Attachment: 1642458468.V64Ib53e0cM310777.rain.home
Description: encoded qp

Attachment: 1642458532.M975986P55111Q5.rain.home
Description: decoded


reply via email to

[Prev in Thread] Current Thread [Next in Thread]