[FFmpeg-cvslog] avformat/dashdec: check the root url length

Steven Liu git at videolan.org
Tue Oct 20 06:42:05 EEST 2020


ffmpeg | branch: master | Steven Liu <lq at chinaffmpeg.org> | Mon Aug 17 20:30:18 2020 +0800| [1ee52b2b6c1f6c9618e435b5ed7608442308efe6] | committer: liuqi05

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 at chinaffmpeg.org>
Signed-off-by: liuqi05 <liuqi05 at kuaishou.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1ee52b2b6c1f6c9618e435b5ed7608442308efe6
---

 libavformat/dashdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
     }



More information about the ffmpeg-cvslog mailing list