Commit afedad24 authored by rbultje's avatar rbultje

Remove check for @ in tcp.c which removes the authorization data from the

actual hostname. This functionality already exists (and always existed) in
url_split() and is therefore useless. See discussion in "[PATCH] tcp.c/udp.c
memleak?" thread on ffmpeg-devel.



git-svn-id: file:///var/local/repositories/ffmpeg/trunk@14946 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent cb7c6133
...@@ -38,7 +38,7 @@ static int tcp_open(URLContext *h, const char *uri, int flags) ...@@ -38,7 +38,7 @@ static int tcp_open(URLContext *h, const char *uri, int flags)
int fd_max, ret; int fd_max, ret;
struct timeval tv; struct timeval tv;
socklen_t optlen; socklen_t optlen;
char hostname[1024],proto[1024],path[1024],tmp[1024],*q; char hostname[1024],proto[1024],path[1024];
if(!ff_network_init()) if(!ff_network_init())
return AVERROR(EIO); return AVERROR(EIO);
...@@ -47,7 +47,6 @@ static int tcp_open(URLContext *h, const char *uri, int flags) ...@@ -47,7 +47,6 @@ static int tcp_open(URLContext *h, const char *uri, int flags)
&port, path, sizeof(path), uri); &port, path, sizeof(path), uri);
if (strcmp(proto,"tcp") || port <= 0 || port >= 65536) if (strcmp(proto,"tcp") || port <= 0 || port >= 65536)
return AVERROR(EINVAL); return AVERROR(EINVAL);
if ((q = strchr(hostname,'@'))) { strcpy(tmp,q+1); strcpy(hostname,tmp); }
dest_addr.sin_family = AF_INET; dest_addr.sin_family = AF_INET;
dest_addr.sin_port = htons(port); dest_addr.sin_port = htons(port);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment