X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Flib%2Flttng-ctl%2Fload.c;h=d55e3b0b4107b12c0cb5e84ef9e0e6aacb22354d;hb=55fb8091d6b72decba72edf53034b05764cc8dac;hp=0f9ccfa0e86143800a7be426f0574df1d6ba8274;hpb=585e6d2ee11ed9823cce767fcf1d8e82e1449c22;p=lttng-tools.git diff --git a/src/lib/lttng-ctl/load.c b/src/lib/lttng-ctl/load.c index 0f9ccfa0e..d55e3b0b4 100644 --- a/src/lib/lttng-ctl/load.c +++ b/src/lib/lttng-ctl/load.c @@ -240,8 +240,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: