From 4ab5469cb4922334d1cd537fa064935472b470a7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Wed, 16 Mar 2022 11:55:08 -0400 Subject: [PATCH] Fix: sessiond: event name length check is too strict MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Change-Id: I172c5098597923d14508c150c7b3577f759bae72 --- src/bin/lttng-sessiond/ust-app.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/lttng-sessiond/ust-app.cpp b/src/bin/lttng-sessiond/ust-app.cpp index 44db0accd..1ae2bbac3 100644 --- a/src/bin/lttng-sessiond/ust-app.cpp +++ b/src/bin/lttng-sessiond/ust-app.cpp @@ -2149,7 +2149,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); -- 2.34.1