X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Furi.c;fp=src%2Fcommon%2Furi.c;h=380e75dd33b4839b144181c35f341a2724ef0f4e;hp=58ffcbcd66de518c8fba4ee4c470609af5ec8491;hb=16aa84a9d47e500a29ed06c929600aa2117a6e80;hpb=623bc34cc3236f5cddef955fb2ae0e538230bba0 diff --git a/src/common/uri.c b/src/common/uri.c index 58ffcbcd6..380e75dd3 100644 --- a/src/common/uri.c +++ b/src/common/uri.c @@ -587,6 +587,10 @@ ssize_t uri_parse_str_urls(const char *ctrl_url, const char *data_url, if (ret < 0) { PERROR("snprintf file url"); goto parse_error; + } else if (ret >= sizeof(url)) { + PERROR("snprintf file url is too long"); + goto parse_error; + } ctrl_url = url; }