X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Flib%2Flttng-ctl%2Fload.c;h=4af13267581b5a3652ca23fe7d49cfd7869b8ff7;hb=a0377dfefe40662ba7d68617bce6ff467114136c;hp=0f9ccfa0e86143800a7be426f0574df1d6ba8274;hpb=3716477e44a520ac4a0c65b15c63a1bb56c37ec3;p=lttng-tools.git diff --git a/src/lib/lttng-ctl/load.c b/src/lib/lttng-ctl/load.c index 0f9ccfa0e..4af132675 100644 --- a/src/lib/lttng-ctl/load.c +++ b/src/lib/lttng-ctl/load.c @@ -1,22 +1,11 @@ /* - * Copyright (C) 2014 - David Goulet + * Copyright (C) 2014 David Goulet * - * This library is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License, version 2.1 only, - * as published by the Free Software Foundation. + * SPDX-License-Identifier: LGPL-2.1-only * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #define _LGPL_SOURCE -#include #include #include @@ -240,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: