Commit 5fbd900f authored by louiz’'s avatar louiz’

Ignore malformed identd queries

fix #3422
parent 23f3f48b
......@@ -25,10 +25,12 @@ void IdentdSocket::parse_in_buffer(const std::size_t)
std::istringstream line(this->in_buf.substr(0, line_end));
this->consume_in_buffer(line_end + 1);
uint16_t local_port;
uint16_t remote_port;
uint16_t local_port{};
uint16_t remote_port{};
char sep;
line >> local_port >> sep >> remote_port;
if (line.fail()) // Data did not match the expected format, ignore the line entirely
continue;
const auto& xmpp = this->server.get_biboumi_component();
auto response = this->generate_answer(xmpp, local_port, remote_port);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment