X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=ltt-sessiond%2Fust-ctl.c;h=d9d4af51a1dc16751bdfd5e26c5412280307526e;hp=2511bb12f27d8f1251d41f23a5c639d51fa874ff;hb=99497cd03fb27fd2416a88d80292a0cc5647bff2;hpb=97b1a726be0f1779f5508543c58521d774312e73 diff --git a/ltt-sessiond/ust-ctl.c b/ltt-sessiond/ust-ctl.c index 2511bb12f..d9d4af51a 100644 --- a/ltt-sessiond/ust-ctl.c +++ b/ltt-sessiond/ust-ctl.c @@ -3,8 +3,8 @@ * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * as published by the Free Software Foundation; only version 2 + * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -23,7 +23,7 @@ #include #include -#include "liblttsessiondcomm.h" +#include #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)); } }