projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: illegal memory access in output_init
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
consumer.c
diff --git
a/src/bin/lttng-sessiond/consumer.c
b/src/bin/lttng-sessiond/consumer.c
index 395657066847944742c6a7a86c72254c0e048022..a8c5fb871d9521ba7853ae1019e0ce9e9571c4a7 100644
(file)
--- a/
src/bin/lttng-sessiond/consumer.c
+++ b/
src/bin/lttng-sessiond/consumer.c
@@
-715,7
+715,10
@@
int consumer_set_network_uri(struct consumer_output *obj,
goto error;
}
goto error;
}
- strncpy(obj->subdir, tmp_path, sizeof(obj->subdir));
+ if (lttng_strncpy(obj->subdir, tmp_path, sizeof(obj->subdir))) {
+ ret = -LTTNG_ERR_INVALID;
+ goto error;
+ }
DBG3("Consumer set network uri subdir path %s", tmp_path);
}
DBG3("Consumer set network uri subdir path %s", tmp_path);
}
@@
-1259,7
+1262,7
@@
end:
*/
int consumer_push_metadata(struct consumer_socket *socket,
uint64_t metadata_key, char *metadata_str, size_t len,
*/
int consumer_push_metadata(struct consumer_socket *socket,
uint64_t metadata_key, char *metadata_str, size_t len,
- size_t target_offset)
+ size_t target_offset
, uint64_t version
)
{
int ret;
struct lttcomm_consumer_msg msg;
{
int ret;
struct lttcomm_consumer_msg msg;
@@
-1275,6
+1278,7
@@
int consumer_push_metadata(struct consumer_socket *socket,
msg.u.push_metadata.key = metadata_key;
msg.u.push_metadata.target_offset = target_offset;
msg.u.push_metadata.len = len;
msg.u.push_metadata.key = metadata_key;
msg.u.push_metadata.target_offset = target_offset;
msg.u.push_metadata.len = len;
+ msg.u.push_metadata.version = version;
health_code_update();
ret = consumer_send_msg(socket, &msg);
health_code_update();
ret = consumer_send_msg(socket, &msg);
This page took
0.024637 seconds
and
4
git commands to generate.