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 7debaed6b813d412404db52c277622cbd1be7154..7efc6bd2ebea7ef007c14a164b43cee48ecc3519 100644
(file)
--- a/
src/lib/lttng-ctl/lttng-ctl.c
+++ b/
src/lib/lttng-ctl/lttng-ctl.c
@@
-3344,18
+3344,18
@@
int lttng_unregister_trigger(const struct lttng_trigger *trigger)
goto end;
}
goto end;
}
- /*
- * This is needed to populate the trigger object size for the command
- * header and number of fds sent.
- */
- message_lsm = (struct lttcomm_session_msg *) message.buffer.data;
-
ret = lttng_trigger_serialize(copy, &message);
if (ret < 0) {
ret = -LTTNG_ERR_UNK;
goto end;
}
ret = lttng_trigger_serialize(copy, &message);
if (ret < 0) {
ret = -LTTNG_ERR_UNK;
goto end;
}
+ /*
+ * This is needed to populate the trigger object size for the command
+ * header and number of fds sent.
+ */
+ 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.02346 seconds
and
4
git commands to generate.