X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=liblttkconsumerd%2Fliblttkconsumerd.c;h=9ad380c8dab5e8c1be679a0881890e929f355c57;hp=a135570fd5c2fe1efebd3c69d443e75e25e949ba;hb=ca3c5ac0cf100d80352a1a81936b5adc47942f35;hpb=fbf10601d3fca6076d257916e9bc38c81b3063e1 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,