Commit f13cce9e authored by Niels Möller's avatar Niels Möller
Browse files

* src/connection.c (handle_connection): Check packet length.

Rev: src/connection.c:1.47
parent 8ef05789
...@@ -72,6 +72,13 @@ handle_connection(struct abstract_write *w, ...@@ -72,6 +72,13 @@ handle_connection(struct abstract_write *w,
return; return;
} }
if (packet->length > closure->rec_max_packet)
{
werror("connection.c: Packet too large!\n");
PROTOCOL_ERROR(closure->e, "Packet too large");
return;
}
msg = packet->data[0]; msg = packet->data[0];
debug("handle_connection: Received packet of type %i (%z)\n", debug("handle_connection: Received packet of type %i (%z)\n",
......
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