Fix: truncation of text array and sequences by NULL terminator
[lttng-ust.git] / liblttng-ust / lttng-ring-buffer-client.h
index 32b812d5e08ccb9cddc8eec1290c6b53de9f7f3f..8e14acf5fc3caebad3ad2ad54c0ed52001a979c2 100644 (file)
@@ -764,10 +764,10 @@ void lttng_event_strcpy(struct lttng_ust_lib_ring_buffer_ctx *ctx, const char *s
 }
 
 static
-void lttng_event_strcpy_pad(struct lttng_ust_lib_ring_buffer_ctx *ctx,
+void lttng_event_pstrcpy_pad(struct lttng_ust_lib_ring_buffer_ctx *ctx,
                     const char *src, size_t len)
 {
-       lib_ring_buffer_strcpy(&client_config, ctx, src, len, '\0');
+       lib_ring_buffer_pstrcpy(&client_config, ctx, src, len, '\0');
 }
 
 #if 0
@@ -819,8 +819,8 @@ int lttng_flush_buffer(struct lttng_ust_lib_ring_buffer_channel *chan,
 static struct lttng_transport lttng_relay_transport = {
        .name = "relay-" RING_BUFFER_MODE_TEMPLATE_STRING "-mmap",
        .ops = {
-               .struct_size = sizeof(struct lttng_ust_channel_ops),
-               .priv = __LTTNG_COMPOUND_LITERAL(struct lttng_ust_channel_ops_private, {
+               .struct_size = sizeof(struct lttng_ust_channel_buffer_ops),
+               .priv = __LTTNG_COMPOUND_LITERAL(struct lttng_ust_channel_buffer_ops_private, {
                        .pub = &lttng_relay_transport.ops,
                        .channel_create = _channel_create,
                        .channel_destroy = lttng_channel_destroy,
@@ -833,7 +833,7 @@ static struct lttng_transport lttng_relay_transport = {
                .event_commit = lttng_event_commit,
                .event_write = lttng_event_write,
                .event_strcpy = lttng_event_strcpy,
-               .event_strcpy_pad = lttng_event_strcpy_pad,
+               .event_pstrcpy_pad = lttng_event_pstrcpy_pad,
        },
        .client_config = &client_config,
 };
This page took 0.025294 seconds and 4 git commands to generate.