From: Björn Axelsson <bjorn.axelsson@intinor.se> --- 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; -- 1.7.9.4