[FFmpeg-devel] [PATCH] avformat/dashdec: check the root url length
Steven Liu
lq at chinaffmpeg.org
Mon Aug 17 15:30:18 EEST 2020
if the length of the root url is 0, unnecessary process the root_url
Signed-off-by: Steven Liu <lq at chinaffmpeg.org>
---
libavformat/dashdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index c5a5ff607b..387d97fe42 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -776,7 +776,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;
}
--
2.25.0
More information about the ffmpeg-devel
mailing list