X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fcommon%2Fevent.c;h=484fde26f28f4beb50ea789debf93ed83e572163;hb=856b414b638f61c09f57227eedc7ca891049fd19;hp=f336875aef9f9306a9ecca742486d8b9ed3bd587;hpb=cf771fa9335f4b9a9b4ddf8bca2da155de5283a1;p=lttng-tools.git diff --git a/src/common/event.c b/src/common/event.c index f336875ae..484fde26f 100644 --- a/src/common/event.c +++ b/src/common/event.c @@ -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;