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