mailio icon indicating copy to clipboard operation
mailio copied to clipboard

Line policy overflow in a header (mime.cpp)

Open Displacer opened this issue 9 months ago • 5 comments

There is a condition for line.length() in mime.cpp parse_by_line function:

if (line.length() > string::size_type(decoder_line_policy_))
    throw mime_error("Line policy overflow in a header.");

decoder_line_policy_ is set to mailio::codec::line_len_policy_t::RECOMMENDED which equals 73.

In some cases MS Exchange mail server produces lines with larger size, leading to exception thrown.

Can this value be increased to support such messages?

Displacer avatar Apr 30 '24 14:04 Displacer