Merge branch 'issue244' into 'master'

ocserv-main should limit the maximum message size a client can send

Closes #244

See merge request openconnect/ocserv!132
This commit is contained in:
Nikos Mavrogiannopoulos
2020-02-20 16:47:52 +00:00

View File

@@ -256,6 +256,13 @@ int handle_worker_commands(main_server_st * s, struct proc_st *proc)
length = ret;
if (length > MAX_MSG_SIZE) {
mslog(s, proc, LOG_DEBUG,
"received too big message (%d)", (int)length);
ret = ERR_BAD_COMMAND;
return ret;
}
mslog(s, proc, LOG_DEBUG, "main received worker's message '%s' of %u bytes\n",
cmd_request_to_str(cmd), (unsigned)length);