[FFmpeg-devel] [PATCH] libavformat/url: check url root node when rel include double dot
Martin Storsjö
martin at martin.st
Mon Apr 27 13:30:12 EEST 2020
On Mon, 27 Apr 2020, Steven Liu wrote:
> fix ticket: 8625
>
> Signed-off-by: Steven Liu <lq at chinaffmpeg.org>
> ---
> libavformat/url.c | 22 ++++++++++++++++++++--
> 1 file changed, 20 insertions(+), 2 deletions(-)
>
> diff --git a/libavformat/url.c b/libavformat/url.c
> index 596fb49cfc..e5003f795a 100644
> --- a/libavformat/url.c
> +++ b/libavformat/url.c
> @@ -81,6 +81,8 @@ void ff_make_absolute_url(char *buf, int size, const char *base,
> const char *rel)
> {
> char *sep, *path_query;
> + char *root = NULL;
> + char *p = NULL;
> /* Absolute path, relative to the current server */
> if (base && strstr(base, "://") && rel[0] == '/') {
> if (base != buf)
There's a good set of tests for this function in libavformat/tests/url.c -
please add a new testcase there for the thing you are implementing (and
ideally, also any other closely related corner case).
// Martin
More information about the ffmpeg-devel
mailing list