summaryrefslogtreecommitdiff
path: root/nDPIsrvd.c
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2022-11-24 12:09:24 +0100
committerToni Uhlig <matzeton@googlemail.com>2022-12-06 12:52:52 +0100
commitd21a38cf029db3fc8f61f00c89452e36b5189bf9 (patch)
tree5c6c500997b218df8bcf02f2cbf3044b086c03b3 /nDPIsrvd.c
parentced5f5d4b4f9617966e519fb234e2aaaf677e22b (diff)
Limit the size of base64 serialized raw packet data (8192 bytes per packet).
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'nDPIsrvd.c')
-rw-r--r--nDPIsrvd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/nDPIsrvd.c b/nDPIsrvd.c
index 6ac6894c9..c2478f452 100644
--- a/nDPIsrvd.c
+++ b/nDPIsrvd.c
@@ -1185,8 +1185,9 @@ static int handle_collector_protocol(int epollfd, struct remote_desc * const cur
{
logger_nDPIsrvd(current,
"BUG: Collector connection",
- "invalid JSON string: %.*s",
- (int)current->event_collector_un.json_bytes,
+ "invalid JSON string: %.*s...",
+ (int)current->event_collector_un.json_bytes > 512 ? 512
+ : (int)current->event_collector_un.json_bytes,
json_read_buffer->buf.ptr.text);
disconnect_client(epollfd, current);
return 1;