changeset 3765:d55fb12134d1 libavformat

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.
author rbultje
date Sun, 24 Aug 2008 16:22:40 +0000
parents 9cff515fd4c6
children f062deeedb8d
files tcp.c
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tcp.c	Sun Aug 24 14:12:03 2008 +0000
+++ b/tcp.c	Sun Aug 24 16:22:40 2008 +0000
@@ -38,7 +38,7 @@
     int fd_max, ret;
     struct timeval tv;
     socklen_t optlen;
-    char hostname[1024],proto[1024],path[1024],tmp[1024],*q;
+    char hostname[1024],proto[1024],path[1024];
 
     if(!ff_network_init())
         return AVERROR(EIO);
@@ -47,7 +47,6 @@
         &port, path, sizeof(path), uri);
     if (strcmp(proto,"tcp") || port <= 0 || port >= 65536)
         return AVERROR(EINVAL);
-    if ((q = strchr(hostname,'@'))) { strcpy(tmp,q+1); strcpy(hostname,tmp); }
 
     dest_addr.sin_family = AF_INET;
     dest_addr.sin_port = htons(port);