X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fset_session.c;h=1f79d6cf08e6f17c97f972a58269cb0b102362f9;hb=70d0b120691e90d81de7b38af8b845e261b5b40c;hp=a428aed16ce239257253ae2f1fd7178fc4ff69e8;hpb=d14d33bf091e72b23b1f90ea18a0a01bed098b76;p=lttng-tools.git diff --git a/src/bin/lttng/commands/set_session.c b/src/bin/lttng/commands/set_session.c index a428aed16..1f79d6cf0 100644 --- a/src/bin/lttng/commands/set_session.c +++ b/src/bin/lttng/commands/set_session.c @@ -60,6 +60,13 @@ static int set_session(void) { int ret = CMD_SUCCESS; + if (opt_session_name && strlen(opt_session_name) > NAME_MAX) { + ERR("Session name too long. Length must be lower or equal to %d", + NAME_MAX); + ret = CMD_ERROR; + goto error; + } + ret = config_init(opt_session_name); if (ret < 0) { ERR("Unable to set session name");