projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
New UST default buffers is now per UID
[lttng-tools.git]
/
src
/
bin
/
lttng
/
commands
/
enable_events.c
diff --git
a/src/bin/lttng/commands/enable_events.c
b/src/bin/lttng/commands/enable_events.c
index 2af85fe476eb74abaf71ea7b456a6ee1723408b1..b00324b2947be0f61e193a55bb2ca0eb27695c7a 100644
(file)
--- a/
src/bin/lttng/commands/enable_events.c
+++ b/
src/bin/lttng/commands/enable_events.c
@@
-268,7
+268,11
@@
int loglevel_str_to_value(const char *inputstr)
int i = 0;
char str[LTTNG_SYMBOL_NAME_LEN];
int i = 0;
char str[LTTNG_SYMBOL_NAME_LEN];
- while (i < LTTNG_SYMBOL_NAME_LEN && inputstr[i] != '\0') {
+ /*
+ * Loop up to LTTNG_SYMBOL_NAME_LEN minus one because the NULL bytes is
+ * added at the end of the loop so a the upper bound we avoid the overflow.
+ */
+ while (i < (LTTNG_SYMBOL_NAME_LEN - 1) && inputstr[i] != '\0') {
str[i] = toupper(inputstr[i]);
i++;
}
str[i] = toupper(inputstr[i]);
i++;
}
@@
-336,7
+340,7
@@
static int enable_events(char *session_name)
} else if (opt_userspace) {
dom.type = LTTNG_DOMAIN_UST;
/* Default. */
} else if (opt_userspace) {
dom.type = LTTNG_DOMAIN_UST;
/* Default. */
- dom.buf_type = LTTNG_BUFFER_PER_
P
ID;
+ dom.buf_type = LTTNG_BUFFER_PER_
U
ID;
} else {
ERR("Please specify a tracer (-k/--kernel or -u/--userspace)");
ret = CMD_ERROR;
} else {
ERR("Please specify a tracer (-k/--kernel or -u/--userspace)");
ret = CMD_ERROR;
This page took
0.043484 seconds
and
5
git commands to generate.