From: Björn Axelsson Date: Tue, 30 Oct 2012 17:31:01 +0000 (+0200) Subject: Look for a fourth slash when splitting the url into app+playpath X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f3e3e6b507ac0df89a11764abd15cc9535593735;p=rtmpdump Look for a fourth slash when splitting the url into app+playpath --- diff --git a/librtmp/parseurl.c b/librtmp/parseurl.c index 0183958..646c70c 100644 --- a/librtmp/parseurl.c +++ b/librtmp/parseurl.c @@ -137,12 +137,14 @@ parsehost: * application = app[/appinstance] */ - char *slash2, *slash3 = NULL; + char *slash2, *slash3 = NULL, *slash4 = NULL; int applen, appnamelen; slash2 = strchr(p, '/'); if(slash2) slash3 = strchr(slash2+1, '/'); + if(slash3) + slash4 = strchr(slash3+1, '/'); applen = end-p; /* ondemand, pass all parameters as app */ appnamelen = applen; /* ondemand length */ @@ -156,7 +158,9 @@ parsehost: appnamelen = 8; } else { /* app!=ondemand, so app is app[/appinstance] */ - if(slash3) + if(slash4) + appnamelen = slash4-p; + else if(slash3) appnamelen = slash3-p; else if(slash2) appnamelen = slash2-p;