Fix: event: erroneous bound check on perf counter name size
[lttng-tools.git] / src / common / event.c
index c52c4ee5a0ce37804006aa1b784681b9af949a6d..531c73b9f1b09a312929d118ff9b4b57a269ed4b 100644 (file)
@@ -1093,7 +1093,8 @@ static ssize_t lttng_event_context_perf_counter_populate_from_buffer(
                        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.030288 seconds and 4 git commands to generate.