Skip to content
Snippets Groups Projects
Commit 7c10ffdd authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont
Browse files

ftp: add missing brackets for IPv6 literals

parent 48ad967a
No related branches found
No related tags found
No related merge requests found
Pipeline #56468 passed with stages
in 26 minutes and 3 seconds
......@@ -979,7 +979,11 @@ static int DirRead (stream_t *p_access, input_item_node_t *p_current_node)
vlc_memstream_putc(&ms, 's');
}
vlc_memstream_puts(&ms, "://");
vlc_memstream_puts(&ms, p_sys->url.psz_host);
if (strchr(p_sys->url.psz_host, ':') != NULL)
vlc_memstream_printf(&ms, "[%s]", p_sys->url.psz_host);
else
vlc_memstream_puts(&ms, p_sys->url.psz_host);
if (p_sys->url.i_port != ((p_sys->tlsmode != IMPLICIT) ? IPPORT_FTP
: IPPORT_FTPS))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment