Hi Sergey!

Thank you so much for your quick reply and for the fix!  I have tested and
it's working fine now!

I'm sorry that I didn't mention on the previous post, but there's also 2
"small" issues with this function. According to RFC 2047, the
'encoded-word' may not be more than 75 characters long, including
'charset', 'encoding', 'encoded-text', and delimiters (in this case, multiple
'encoded-word's --separated by CRLF SPACE-- may be used) . And the
'encoded-text' should not allow spaces and the '?' character. ('?' is
currently being used 'as is' but instead should be encoded as =3F).

If I encode the subject "Are you sure?" it will result as
"=?utf-8?Q?Are_you_sure??=" but should be "=?utf-8?Q?Are_you_sure=3F?=".
For curiosity, this only shows as en error with the Mail client from
Apple's iOS. All other mail readers that I've tested don't bother with this.

Another example:
"This is a really long subject line with a question mark at the end oh my
god it never ends?"

=?UTF-8?Q?This_is_a_really_long_subject_line_with_a_question_mark_at_the_e?=
<CRLF SPACE> =?UTF-8?Q?nd_oh_my_god_it_never_ends=3F?=

For a quick fix, I ended replacing this specific function with my own, but
I really want to thank you for taking your time to fix this so quickly.
You're amazing!

Thank you!

Regards from Brazil,
Henrique

On Fri, Feb 17, 2017 at 5:36 AM Sergey Poznyakoff <[email protected]> wrote:

> Hi Henrique,
>
> > One of my programs is presenting large memory usage, and I traced it down
> > to the mu_rfc2047_encode function that I'm using.
>
> Thanks a lot for your report.  I have fixed the bug in the repository.
> Please apply this patch:
>
>
> http://git.savannah.gnu.org/cgit/mailutils.git/commit/?id=afaecb9b14696dfe12e2f2f501906dbd01cec27e
>
> Best regards,
> Sergey
>
>
>
_______________________________________________
Bug-mailutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-mailutils

Reply via email to