X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fconsumer.c;h=a8c5fb871d9521ba7853ae1019e0ce9e9571c4a7;hp=bd019dd31da15f6953b873899f12b4dd07770c9a;hb=bfc6eff048df5515de3aedb7e2eb52d41ba64d22;hpb=6ce228753245961753ae3c81bfb7268433b712b4 diff --git a/src/bin/lttng-sessiond/consumer.c b/src/bin/lttng-sessiond/consumer.c index bd019dd31..a8c5fb871 100644 --- a/src/bin/lttng-sessiond/consumer.c +++ b/src/bin/lttng-sessiond/consumer.c @@ -715,7 +715,10 @@ int consumer_set_network_uri(struct consumer_output *obj, goto error; } - strncpy(obj->subdir, tmp_path, sizeof(obj->subdir)); + if (lttng_strncpy(obj->subdir, tmp_path, sizeof(obj->subdir))) { + ret = -LTTNG_ERR_INVALID; + goto error; + } DBG3("Consumer set network uri subdir path %s", tmp_path); }