Fix: unchecked buffer size for communication header
[lttng-tools.git] / src / bin / lttng-sessiond / client.c
index 04846abf57f0ffcea7d119898197163ac998774e..ecd31ea48b11159d56b3f350f15d58b40eb19114 100644 (file)
@@ -1334,6 +1334,11 @@ error_add_context:
 
                payload_view = lttng_buffer_view_from_dynamic_buffer(
                                &payload, 0, name_len);
+               if (name_len > 0 && !lttng_buffer_view_is_valid(&payload_view)) {
+                       ret = LTTNG_ERR_INVALID_PROTOCOL;
+                       goto error_add_remove_tracker_value;
+               }
+
                /*
                 * Validate the value type and domains are legal for the process
                 * attribute tracker that is specified and convert the value to
This page took 0.023358 seconds and 4 git commands to generate.