projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: lttng-ctl: appending to dynamic buffer invalidates its data member
[lttng-tools.git]
/
src
/
lib
/
lttng-ctl
/
lttng-ctl.c
diff --git
a/src/lib/lttng-ctl/lttng-ctl.c
b/src/lib/lttng-ctl/lttng-ctl.c
index d0a117f4be1dba076b877b226162cf74fbc71ac3..5b774e1d6bcbc1e9df4c01efc0e98634e1172e72 100644
(file)
--- a/
src/lib/lttng-ctl/lttng-ctl.c
+++ b/
src/lib/lttng-ctl/lttng-ctl.c
@@
-3147,18
+3147,18
@@
int lttng_register_trigger(struct lttng_trigger *trigger)
goto end;
}
goto end;
}
- /*
- * This is needed to populate the trigger object size for the command
- * header.
- */
- message_lsm = (struct lttcomm_session_msg *) message.buffer.data;
-
ret = lttng_trigger_serialize(trigger, &message);
if (ret < 0) {
ret = -LTTNG_ERR_UNK;
goto end;
}
ret = lttng_trigger_serialize(trigger, &message);
if (ret < 0) {
ret = -LTTNG_ERR_UNK;
goto end;
}
+ /*
+ * This is needed to populate the trigger object size for the command
+ * header.
+ */
+ message_lsm = (struct lttcomm_session_msg *) message.buffer.data;
+
message_lsm->u.trigger.length = (uint32_t) message.buffer.size - sizeof(lsm);
{
message_lsm->u.trigger.length = (uint32_t) message.buffer.size - sizeof(lsm);
{
This page took
0.023325 seconds
and
4
git commands to generate.