@@ -76,11+84,21 @@ int cmd_create_session_2_11(const struct lttng_buffer_view *payload,
ERR("Length of hostname (%" PRIu32 " bytes) received in create_session command exceeds maximum length (%d bytes)", header.hostname_len, LTTNG_HOST_NAME_MAX);
goto error;
}
ERR("Length of hostname (%" PRIu32 " bytes) received in create_session command exceeds maximum length (%d bytes)", header.hostname_len, LTTNG_HOST_NAME_MAX);
goto error;
}
+ if (header.base_path_len > LTTNG_PATH_MAX) {
+ ret = -ENAMETOOLONG;
+ ERR("Length of base_path (%" PRIu32 " bytes) received in create_session command exceeds maximum length (%d bytes)", header.base_path_len, PATH_MAX);