Fix: event: erroneous bound check on perf counter name size
[lttng-tools.git] / src / common / event.c
index f336875aef9f9306a9ecca742486d8b9ed3bd587..484fde26f28f4beb50ea789debf93ed83e572163 100644 (file)
@@ -1040,7 +1040,8 @@ static ssize_t lttng_event_context_perf_counter_populate_from_payload(
                        goto end;
                }
 
-               ret = lttng_strncpy(event_ctx->u.perf_counter.name, name, name_len);
+               ret = lttng_strncpy(event_ctx->u.perf_counter.name, name,
+                               sizeof(event_ctx->u.perf_counter.name));
                if (ret) {
                        consumed = -1;
                        goto end;
This page took 0.023853 seconds and 4 git commands to generate.