Fix: sessiond: event name length check is too strict
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 16 Mar 2022 15:55:08 +0000 (11:55 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 17 Mar 2022 17:25:15 +0000 (13:25 -0400)
A truncation check when initializing an event from an event rule limits
the name to one less character than is supposed to be allowed.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I172c5098597923d14508c150c7b3577f759bae72

src/bin/lttng-sessiond/ust-app.c

index f2e961d0a4158bb69eebc89068e48d38e04e58ea..5db8366ad6edf01d270f06182291daf686791e18 100644 (file)
@@ -2151,7 +2151,7 @@ static int init_ust_event_notifier_from_event_rule(
 
        event_notifier->event.instrumentation = LTTNG_UST_ABI_TRACEPOINT;
        ret = lttng_strncpy(event_notifier->event.name, pattern,
-                       LTTNG_UST_ABI_SYM_NAME_LEN - 1);
+                       sizeof(event_notifier->event.name));
        if (ret) {
                ERR("Failed to copy event rule pattern to notifier: pattern = '%s' ",
                                pattern);
This page took 0.027222 seconds and 4 git commands to generate.