X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=tests%2Funit%2Ftest_ust_data.c;h=ac26359b00fb174c86120effb55b438134a82aeb;hb=9caa2a3d73a50e2964cda5e3dd510e92d25f31b0;hp=d90cd23e8fc647018188433c639a110cda828f11;hpb=7f6639c208fdea0b21476c24577d4286bf2aa80a;p=lttng-tools.git diff --git a/tests/unit/test_ust_data.c b/tests/unit/test_ust_data.c index d90cd23e8..ac26359b0 100644 --- a/tests/unit/test_ust_data.c +++ b/tests/unit/test_ust_data.c @@ -176,9 +176,9 @@ static void test_create_ust_event_exclusion(void) exclusion->count = exclusion_count; random_name = get_random_string(); strncpy(LTTNG_EVENT_EXCLUSION_NAME_AT(exclusion, 0), random_name, - LTTNG_SYMBOL_NAME_LEN); + LTTNG_SYMBOL_NAME_LEN - 1); strncpy(LTTNG_EVENT_EXCLUSION_NAME_AT(exclusion, 1), random_name, - LTTNG_SYMBOL_NAME_LEN); + LTTNG_SYMBOL_NAME_LEN - 1); ret = trace_ust_create_event(&ev, NULL, NULL, exclusion, false, &event); exclusion = NULL; @@ -208,9 +208,9 @@ static void test_create_ust_event_exclusion(void) exclusion->count = exclusion_count; strncpy(LTTNG_EVENT_EXCLUSION_NAME_AT(exclusion, 0), - get_random_string(), LTTNG_SYMBOL_NAME_LEN); + get_random_string(), LTTNG_SYMBOL_NAME_LEN - 1); strncpy(LTTNG_EVENT_EXCLUSION_NAME_AT(exclusion, 1), - get_random_string(), LTTNG_SYMBOL_NAME_LEN); + get_random_string(), LTTNG_SYMBOL_NAME_LEN - 1); exclusion_copy->count = exclusion_count; strncpy(LTTNG_EVENT_EXCLUSION_NAME_AT(exclusion_copy, 0),