aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/protocols/thrift.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/protocols/thrift.c b/src/lib/protocols/thrift.c
index 344795523..92f003781 100644
--- a/src/lib/protocols/thrift.c
+++ b/src/lib/protocols/thrift.c
@@ -120,7 +120,7 @@ static void thrift_set_method(struct ndpi_detection_module_struct *ndpi_struct,
ndpi_set_risk(ndpi_struct, flow, NDPI_INVALID_CHARACTERS, "Invalid method name");
flow->protos.thrift.method[0] = '\0';
} else {
- strncpy(flow->protos.thrift.method, method, method_length);
+ strncpy(flow->protos.thrift.method, method, ndpi_min(sizeof(flow->protos.thrift.method), method_length));
}
}