X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=ltt-sessiond%2Fkernel-ctl.c;h=cfea8942da7f421d4eeaf272f59b51261fe08e3e;hp=407dd580448c18d61cd0c9a2a168589fc6fb5a14;hb=50ecdf72034d220d3b0300d0caa13e6946be555b;hpb=ced2f82009443bb90d8e385e86717c78c249adb7 diff --git a/ltt-sessiond/kernel-ctl.c b/ltt-sessiond/kernel-ctl.c index 407dd5804..cfea8942d 100644 --- a/ltt-sessiond/kernel-ctl.c +++ b/ltt-sessiond/kernel-ctl.c @@ -25,7 +25,7 @@ #include #include "lttngerr.h" -#include "libkernelctl.h" +#include "kernelctl.h" #include "kernel-ctl.h" /* @@ -609,7 +609,8 @@ ssize_t kernel_list_events(int tracer_fd, struct lttng_event **events) goto error; } } - strncpy(elist[count].name, event, strlen(event)); + strncpy(elist[count].name, event, LTTNG_SYMBOL_NAME_LEN); + elist[count].name[LTTNG_SYMBOL_NAME_LEN - 1] = '\0'; count++; }