Return an error whenever a session's destinatio path exceeds the
maximal allowed length (LTTNG_PATH_MAX).
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
ret = lttng_strncpy(consumer->dst.session_root_path,
uri->dst.path,
sizeof(consumer->dst.session_root_path));
ret = lttng_strncpy(consumer->dst.session_root_path,
uri->dst.path,
sizeof(consumer->dst.session_root_path));
+ if (ret) {
+ ret_code = LTTNG_ERR_FATAL;
+ goto error;
+ }
consumer->type = CONSUMER_DST_LOCAL;
break;
}
consumer->type = CONSUMER_DST_LOCAL;
break;
}