diff options
author | Anton Khirnov <anton@khirnov.net> | 2016-01-20 11:11:38 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2016-02-22 11:48:30 +0100 |
commit | ec4c48397641dbaf4ae8df36c32aaa5a311a11bf (patch) | |
tree | 04b1a3187ffa6c4a1821eb5d6dc70ac8397b5006 /libavformat/rtspdec.c | |
parent | 8c0ceafb0f25da077ff23e394667119f031574fd (diff) | |
download | ffmpeg-ec4c48397641dbaf4ae8df36c32aaa5a311a11bf.tar.gz |
lavf: add a protocol whitelist/blacklist for file opened internally
Should make the default behaviour safer for careless callers that open
random untrusted files.
Bug-Id: CVE-2016-1897
Bug-Id: CVE-2016-1898
Diffstat (limited to 'libavformat/rtspdec.c')
-rw-r--r-- | libavformat/rtspdec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c index c6f4d521e4..7b6a0258c8 100644 --- a/libavformat/rtspdec.c +++ b/libavformat/rtspdec.c @@ -640,7 +640,8 @@ static int rtsp_listen(AVFormatContext *s) enum RTSPMethod methodcode; if (!rt->protocols) { - rt->protocols = ffurl_get_protocols(NULL, NULL); + rt->protocols = ffurl_get_protocols(s->protocol_whitelist, + s->protocol_blacklist); if (!rt->protocols) return AVERROR(ENOMEM); } |