Truncate exclusion names to have a terminal '\0'
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 26 Aug 2015 22:11:46 +0000 (18:11 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 4 Nov 2015 20:55:44 +0000 (15:55 -0500)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/lib/lttng-ctl/lttng-ctl.c

index ae27e6b5b3c42ca37c496631f4de793ee4733449..665aba57d7cb80f37656c670fe6d3760747eb7a0 100644 (file)
@@ -999,7 +999,8 @@ int lttng_enable_event_with_exclusions(struct lttng_handle *handle,
        /* Put exclusion names first in the data */
        while (exclusion_count--) {
                strncpy(varlen_data + LTTNG_SYMBOL_NAME_LEN * exclusion_count,
-                       *(exclusion_list + exclusion_count), LTTNG_SYMBOL_NAME_LEN);
+                       *(exclusion_list + exclusion_count),
+                       LTTNG_SYMBOL_NAME_LEN - 1);
        }
        /* Add filter expression next */
        if (lsm.u.enable.expression_len != 0) {
This page took 0.029084 seconds and 4 git commands to generate.