[rtmpdump] r315 - trunk/librtmp/parseurl.c

hyc subversion at mplayerhq.hu
Tue Mar 9 03:50:46 CET 2010


Author: hyc
Date: Tue Mar  9 03:50:45 2010
New Revision: 315

Log:
Fix hostname parsing

Modified:
   trunk/librtmp/parseurl.c

Modified: trunk/librtmp/parseurl.c
==============================================================================
--- trunk/librtmp/parseurl.c	Tue Mar  9 00:23:37 2010	(r314)
+++ trunk/librtmp/parseurl.c	Tue Mar  9 03:50:45 2010	(r315)
@@ -90,12 +90,12 @@ parsehost:
 
 	{
 	int hostlen;
-	if(col)
-		hostlen = col - p;
-	else if(slash)
+	if(slash)
 		hostlen = slash - p;
 	else
 		hostlen = end - p;
+	if(col && col -p < hostlen)
+		hostlen = col - p;
 
 	if(hostlen < 256) {
 		*host = malloc(hostlen+1);


More information about the rtmpdump mailing list