X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Flib%2Flttng-ctl%2Fload.c;h=4af13267581b5a3652ca23fe7d49cfd7869b8ff7;hb=657d1bf105996bf8f6e13af697fb1112afa61b28;hp=28e1dbac6d2969eaa69b60e6c39260bb4f53d7f4;hpb=ab5be9fa2eb5ba9600a82cd18fd3cfcbac69169a;p=lttng-tools.git diff --git a/src/lib/lttng-ctl/load.c b/src/lib/lttng-ctl/load.c index 28e1dbac6..4af132675 100644 --- a/src/lib/lttng-ctl/load.c +++ b/src/lib/lttng-ctl/load.c @@ -6,7 +6,6 @@ */ #define _LGPL_SOURCE -#include #include #include @@ -230,8 +229,12 @@ int lttng_load_session_attr_set_input_url( } /* Copy string plus the NULL terminated byte. */ - lttng_ctl_copy_string(attr->input_url, uris[0].dst.path, + ret = lttng_strncpy(attr->input_url, uris[0].dst.path, sizeof(attr->input_url)); + if (ret) { + ret = -LTTNG_ERR_INVALID; + goto error; + } end: error: