aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/dashdec.c
diff options
context:
space:
mode:
authorSteven Liu <lq@chinaffmpeg.org>2020-08-17 20:30:18 +0800
committerliuqi05 <liuqi05@kuaishou.com>2020-10-20 11:41:44 +0800
commit1ee52b2b6c1f6c9618e435b5ed7608442308efe6 (patch)
treec13cbb50133b9839568c16763ff32fdefa981010 /libavformat/dashdec.c
parenta424671e4f1beccca5a5958add86b69eb4fe8da7 (diff)
downloadffmpeg-1ee52b2b6c1f6c9618e435b5ed7608442308efe6.tar.gz
avformat/dashdec: check the root url length
if the length of the root url is 0, unnecessary process the root_url Signed-off-by: Steven Liu <lq@chinaffmpeg.org> Signed-off-by: liuqi05 <liuqi05@kuaishou.com>
Diffstat (limited to 'libavformat/dashdec.c')
-rw-r--r--libavformat/dashdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index c28bb07f44..693fc7372b 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -771,7 +771,7 @@ static int resolve_content_path(AVFormatContext *s, const char *url, int *max_ur
size = strlen(root_url);
isRootHttp = ishttp(root_url);
- if (root_url[size - 1] != token) {
+ if (size > 0 && root_url[size - 1] != token) {
av_strlcat(root_url, "/", size + 2);
size += 2;
}