mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 12:23:32 +01:00
Add assertions for correct input to handle_control_command.
This commit is contained in:
parent
d1f5957c4e
commit
f3bd0240a6
@ -2398,6 +2398,10 @@ handle_control_command(control_connection_t *conn,
|
||||
uint32_t cmd_data_len,
|
||||
char *args)
|
||||
{
|
||||
tor_assert(conn);
|
||||
tor_assert(args);
|
||||
tor_assert(args[cmd_data_len] == '\0');
|
||||
|
||||
for (unsigned i = 0; i < N_CONTROL_COMMANDS; ++i) {
|
||||
const control_cmd_def_t *def = &CONTROL_COMMANDS[i];
|
||||
if (!strcasecmp(conn->incoming_cmd, def->name)) {
|
||||
|
Loading…
Reference in New Issue
Block a user