From f3e3e6b507ac0df89a11764abd15cc9535593735 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B6rn=20Axelsson?= Date: Tue, 30 Oct 2012 19:31:01 +0200 Subject: [PATCH] Look for a fourth slash when splitting the url into app+playpath --- librtmp/parseurl.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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; -- 2.40.0