Skip to content

Commit 7e94d69

Browse files
layercak3sfan5
authored andcommitted
demux_libarchive: escape '%' in stream URL path
Opening paths that are detected as archives which contain '%[0-9A-Fa-f][0-9A-Fa-f]' will fail, because such sequence is treated as a percent-encoded value when the path gets unescaped causing the path to be mangled. Escape '%' to prevent this from happening. Fixes: 2b280f4 ("stream: libarchive wrapper for reading compressed archives")
1 parent b47fd28 commit 7e94d69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

demux/demux_libarchive.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ static int open_file(struct demuxer *demuxer, enum demux_check check)
7676
struct playlist *pl = talloc_zero(demuxer, struct playlist);
7777
demuxer->playlist = pl;
7878

79-
char *prefix = mp_normalize_path(NULL, mp_url_escape(mpa, demuxer->stream->url, "~|"));
79+
char *prefix = mp_normalize_path(NULL, mp_url_escape(mpa, demuxer->stream->url, "~|%"));
8080

8181
char **files = NULL;
8282
int num_files = 0;

0 commit comments

Comments
 (0)