X-Git-Url: http://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Flib%2Flttng-ctl%2Fload.c;h=db9bfe0bf18bca0eaf3c6f2277bed6dda2f601d8;hp=28e1dbac6d2969eaa69b60e6c39260bb4f53d7f4;hb=e1b624d005769d1a2e9eb39fee63c73c6395fd76;hpb=43ed148559609eba941bb3dffa35bff67341e64d diff --git a/src/lib/lttng-ctl/load.c b/src/lib/lttng-ctl/load.c index 28e1dbac6..db9bfe0bf 100644 --- a/src/lib/lttng-ctl/load.c +++ b/src/lib/lttng-ctl/load.c @@ -230,8 +230,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: