Clean-up: sessiond-comm: out of bounds access warning
[lttng-tools.git] / src / common / event.cpp
index 7946d320975a08cdf54bc9bbd0d9a370f4e37687..9cef3e9b9189829be10ca8eea0c300ac8be4fb4f 100644 (file)
@@ -319,8 +319,8 @@ static ssize_t lttng_event_exclusions_create_from_payload(
                        goto end;
                }
 
-               ret = lttng_strncpy(local_exclusions->names[i], string,
-                               sizeof(local_exclusions->names[i]));
+               ret = lttng_strncpy(LTTNG_EVENT_EXCLUSION_NAME_AT(local_exclusions, i), string,
+                               sizeof(LTTNG_EVENT_EXCLUSION_NAME_AT(local_exclusions, i)));
                if (ret) {
                        ret = -1;
                        goto end;
@@ -1041,7 +1041,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.02459 seconds and 4 git commands to generate.