X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=tests%2Funit%2Ftest_ust_data.cpp;fp=tests%2Funit%2Ftest_ust_data.cpp;h=ee566f3957a38fd7bb4ac7a405339e332352aa04;hp=b3557674299ac03809362808275257c17c3d986f;hb=b43eb2f612ab4a816c9c1d8f3ba3346cd722074e;hpb=739b8e1740ff0dc8a37aaea4b6e2bbf0cf9dcf70 diff --git a/tests/unit/test_ust_data.cpp b/tests/unit/test_ust_data.cpp index b35576742..ee566f395 100644 --- a/tests/unit/test_ust_data.cpp +++ b/tests/unit/test_ust_data.cpp @@ -175,9 +175,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; @@ -207,9 +207,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),