You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-05-16 08:38:24 +02:00
avformat/hls: forbid all protocols except http(s) & file
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 7145e80b4f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
committed by
Michael Niedermayer
parent
90c2256ee5
commit
b7d54d6e07
@@ -618,6 +618,10 @@ static int open_url(HLSContext *c, URLContext **uc, const char *url, AVDictionar
|
|||||||
{
|
{
|
||||||
AVDictionary *tmp = NULL;
|
AVDictionary *tmp = NULL;
|
||||||
int ret;
|
int ret;
|
||||||
|
const char *proto_name = avio_find_protocol_name(url);
|
||||||
|
// only http(s) & file are allowed
|
||||||
|
if (!av_strstart(proto_name, "http", NULL) && !av_strstart(proto_name, "file", NULL))
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
|
||||||
av_dict_copy(&tmp, c->avio_opts, 0);
|
av_dict_copy(&tmp, c->avio_opts, 0);
|
||||||
av_dict_copy(&tmp, opts, 0);
|
av_dict_copy(&tmp, opts, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user