Better debug and fix an error handling
[lttng-tools.git] / ltt-sessiond / ust-ctl.c
index abee38817135392c93b55fb97a78d54936f0545a..fe65fafe2c6f3d00a930c5108595657d91522000 100644 (file)
@@ -23,7 +23,7 @@
 #include <string.h>
 #include <unistd.h>
 
-#include <lttng/lttng-sessiond-comm.h>
+#include <lttng-sessiond-comm.h>
 #include "lttngerr.h"
 #include "ust-ctl.h"
 
@@ -89,7 +89,8 @@ void get_traces_per_session(struct ltt_session *session, struct lttng_trace *tra
 
        if (session->kern_session_count > 0) {
                trace.type = KERNEL;
-               strncpy(trace.name, "kernel", 6);
+               strncpy(trace.name, "kernel", sizeof(trace.name));
+               trace.name[sizeof(trace.name) - 1] = '\0';
                memcpy(&traces[i], &trace, sizeof(trace));
        }
 }
This page took 0.023425 seconds and 4 git commands to generate.