Limit log length with IPC commands

Fixes #3525
This commit is contained in:
Orestis Floros
2020-04-10 16:41:51 +02:00
parent 57a37f8af4
commit 964456b628
3 changed files with 3 additions and 3 deletions

View File

@@ -224,7 +224,7 @@ IPC_HANDLER(run_command) {
/* To get a properly terminated buffer, we copy
* message_size bytes out of the buffer */
char *command = sstrndup((const char *)message, message_size);
LOG("IPC: received: *%s*\n", command);
LOG("IPC: received: *%.4000s*\n", command);
yajl_gen gen = yajl_gen_alloc(NULL);
CommandResult *result = parse_command(command, gen, client);