projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: ini parser: truncation of value name
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
cmd.cpp
diff --git
a/src/bin/lttng-sessiond/cmd.cpp
b/src/bin/lttng-sessiond/cmd.cpp
index 388e056e0c15dc7a8534c60ae59043bbf108a357..8f274abcb0524305adf35a4ce05fe0cdefbeb2a0 100644
(file)
--- a/
src/bin/lttng-sessiond/cmd.cpp
+++ b/
src/bin/lttng-sessiond/cmd.cpp
@@
-1435,19
+1435,23
@@
static enum lttng_error_code cmd_enable_channel_internal(struct ltt_session *ses
* adhered to.
*/
if (domain->type == LTTNG_DOMAIN_JUL) {
* adhered to.
*/
if (domain->type == LTTNG_DOMAIN_JUL) {
- if (strncmp(attr->name, DEFAULT_JUL_CHANNEL_NAME, LTTNG_SYMBOL_NAME_LEN)) {
+ if (strncmp(attr->name,
+ DEFAULT_JUL_CHANNEL_NAME,
+ LTTNG_SYMBOL_NAME_LEN - 1) != 0) {
ret_code = LTTNG_ERR_INVALID_CHANNEL_NAME;
goto error;
}
} else if (domain->type == LTTNG_DOMAIN_LOG4J) {
ret_code = LTTNG_ERR_INVALID_CHANNEL_NAME;
goto error;
}
} else if (domain->type == LTTNG_DOMAIN_LOG4J) {
- if (strncmp(attr->name, DEFAULT_LOG4J_CHANNEL_NAME, LTTNG_SYMBOL_NAME_LEN)) {
+ if (strncmp(attr->name,
+ DEFAULT_LOG4J_CHANNEL_NAME,
+ LTTNG_SYMBOL_NAME_LEN - 1) != 0) {
ret_code = LTTNG_ERR_INVALID_CHANNEL_NAME;
goto error;
}
} else if (domain->type == LTTNG_DOMAIN_PYTHON) {
if (strncmp(attr->name,
DEFAULT_PYTHON_CHANNEL_NAME,
ret_code = LTTNG_ERR_INVALID_CHANNEL_NAME;
goto error;
}
} else if (domain->type == LTTNG_DOMAIN_PYTHON) {
if (strncmp(attr->name,
DEFAULT_PYTHON_CHANNEL_NAME,
- LTTNG_SYMBOL_NAME_LEN
)
) {
+ LTTNG_SYMBOL_NAME_LEN
- 1) != 0
) {
ret_code = LTTNG_ERR_INVALID_CHANNEL_NAME;
goto error;
}
ret_code = LTTNG_ERR_INVALID_CHANNEL_NAME;
goto error;
}
@@
-1935,11
+1939,11
@@
int cmd_add_context(struct command_ctx *cmd_ctx,
* name, return an error.
*/
if (domain == LTTNG_DOMAIN_JUL && *channel_name &&
* name, return an error.
*/
if (domain == LTTNG_DOMAIN_JUL && *channel_name &&
- strcmp(channel_name, DEFAULT_JUL_CHANNEL_NAME)) {
+ strcmp(channel_name, DEFAULT_JUL_CHANNEL_NAME)
!= 0
) {
ret = LTTNG_ERR_UST_CHAN_NOT_FOUND;
goto error;
} else if (domain == LTTNG_DOMAIN_LOG4J && *channel_name &&
ret = LTTNG_ERR_UST_CHAN_NOT_FOUND;
goto error;
} else if (domain == LTTNG_DOMAIN_LOG4J && *channel_name &&
- strcmp(channel_name, DEFAULT_LOG4J_CHANNEL_NAME)) {
+ strcmp(channel_name, DEFAULT_LOG4J_CHANNEL_NAME)
!= 0
) {
ret = LTTNG_ERR_UST_CHAN_NOT_FOUND;
goto error;
}
ret = LTTNG_ERR_UST_CHAN_NOT_FOUND;
goto error;
}
This page took
0.025129 seconds
and
4
git commands to generate.