Browse Source

Oops: Non-MIME mails shall be put in msg->longmsg, not msg->shortmsg (which holds the "Subject" of the e-mail)

afl-fuzzing
Roker 3 years ago
parent
commit
3c1890893d
2 changed files with 3 additions and 3 deletions
  1. +2
    -2
      src/bodyparser.cc
  2. +1
    -1
      src/pEpMIME.cc

+ 2
- 2
src/bodyparser.cc View File

@ -306,14 +306,14 @@ void parse_body(message* msg, const HeaderSection& headers, const BodyLines& bod
}
}else{ // Non-MIME mail
std::cerr << "<<< NO_MIME_MAIL >>>\n";
std::cerr << "<<< NO_MIME_MAIL >>> " << body.size() << " body lines.\n";
size_t body_size = 0;
for(const auto& line : body)
{
body_size += line.size() + 2;
}
char* pbody = msg->shortmsg = new_string(nullptr, body_size);
char* pbody = msg->longmsg = new_string(nullptr, body_size);
for(const auto& line : body)
{


+ 1
- 1
src/pEpMIME.cc View File

@ -156,7 +156,7 @@ message* parse_message2(const char* begin, const char* const end)
headers.push_back(nv);
}
std::cerr << "Parsing result: " << headers.size() << " parsed header lines:\n";
std::cerr << "Parsing result: " << headers.size() << " parsed header lines (from " << headersize << " original lines):\n";
for(const auto& h : headers)
{
std::cerr << "" << h.name << "” : “" << h.value << "\n";


Loading…
Cancel
Save