X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-relayd%2Fcmd-2-4.c;fp=src%2Fbin%2Flttng-relayd%2Fcmd-2-4.c;h=008be4cf0db901b038e98f3398dc097861847ea4;hp=e20a838da932051572ebd2db984bf3b9eddaa408;hb=e7f8eff3a01708a32fc2a475b88420ab21ed821f;hpb=04dedfc0d1355fb579409fc3f27e84120f359a62 diff --git a/src/bin/lttng-relayd/cmd-2-4.c b/src/bin/lttng-relayd/cmd-2-4.c index e20a838da..008be4cf0 100644 --- a/src/bin/lttng-relayd/cmd-2-4.c +++ b/src/bin/lttng-relayd/cmd-2-4.c @@ -52,6 +52,10 @@ int cmd_create_session_2_4(const struct lttng_buffer_view *payload, ret = -ENAMETOOLONG; ERR("Session name too long"); goto error; + } else if (len == 0) { + ret = -EINVAL; + ERR("Session name can't be of length 0"); + goto error; } strncpy(session_name, session_info.session_name, LTTNG_NAME_MAX);