X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=liblttkconsumerd%2Fliblttkconsumerd.c;fp=liblttkconsumerd%2Fliblttkconsumerd.c;h=9ad380c8dab5e8c1be679a0881890e929f355c57;hp=a135570fd5c2fe1efebd3c69d443e75e25e949ba;hb=99497cd03fb27fd2416a88d80292a0cc5647bff2;hpb=773168b7255d45fd28f018055292e93b7a76482d diff --git a/liblttkconsumerd/liblttkconsumerd.c b/liblttkconsumerd/liblttkconsumerd.c index a135570fd..9ad380c8d 100644 --- a/liblttkconsumerd/liblttkconsumerd.c +++ b/liblttkconsumerd/liblttkconsumerd.c @@ -177,6 +177,7 @@ static int kconsumerd_add_fd(struct lttcomm_kconsumerd_msg *buf, int consumerd_f tmp_fd->state = buf->state; tmp_fd->max_sb_size = buf->max_sb_size; strncpy(tmp_fd->path_name, buf->path_name, PATH_MAX); + tmp_fd->path_name[PATH_MAX - 1] = '\0'; /* Opening the tracefile in write mode */ ret = open(tmp_fd->path_name,