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/avformat.h | |
parent | 8c0ceafb0f25da077ff23e394667119f031574fd (diff) |
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/avformat.h')
-rw-r--r-- | libavformat/avformat.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 8dab2b75e7..b63541d411 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1261,6 +1261,24 @@ typedef struct AVFormatContext { * A callback for closing the streams opened with AVFormatContext.io_open(). */ void (*io_close)(struct AVFormatContext *s, AVIOContext *pb); + + /** + * A comma-separated list of protocol names that will not be used internally + * by libavformat. If this field is a non-empty string, then protocols + * listed here will be forbidden. + * + * This field should be set using AVOptions. + */ + char *protocol_blacklist; + + /** + * A comma-separated list of protocol names that can be used internally by + * libavformat. If this field is a non-empty string, all protocols not + * listed here will be forbidden. + * + * This field should be set using AVOptions. + */ + char *protocol_whitelist; } AVFormatContext; typedef struct AVPacketList { |