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

Steven Liu lingjiujianke at gmail.com
Tue Oct 20 06:43:18 EEST 2020


Steven Liu <lq at chinaffmpeg.org> 于2020年8月17日周一 下午8:30写道:
>
> 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
>
>
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".

pushed


Thanks
Steven


More information about the ffmpeg-devel mailing list