projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: session name max length was not handled correctly
[lttng-tools.git]
/
src
/
bin
/
lttng
/
commands
/
set_session.c
diff --git
a/src/bin/lttng/commands/set_session.c
b/src/bin/lttng/commands/set_session.c
index a428aed16ce239257253ae2f1fd7178fc4ff69e8..1f79d6cf08e6f17c97f972a58269cb0b102362f9 100644
(file)
--- 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;
{
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");
ret = config_init(opt_session_name);
if (ret < 0) {
ERR("Unable to set session name");
This page took
0.024248 seconds
and
4
git commands to generate.