summaryrefslogtreecommitdiff
path: root/libavformat/options_table.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2016-01-20 11:11:38 +0100
committerAnton Khirnov <anton@khirnov.net>2016-02-22 11:48:30 +0100
commitec4c48397641dbaf4ae8df36c32aaa5a311a11bf (patch)
tree04b1a3187ffa6c4a1821eb5d6dc70ac8397b5006 /libavformat/options_table.h
parent8c0ceafb0f25da077ff23e394667119f031574fd (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/options_table.h')
-rw-r--r--libavformat/options_table.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/options_table.h b/libavformat/options_table.h
index 8372ef3650..b566da6400 100644
--- a/libavformat/options_table.h
+++ b/libavformat/options_table.h
@@ -70,6 +70,10 @@ static const AVOption avformat_options[] = {
{"auto", "enabled when required by target format", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_AVOID_NEG_TS_AUTO }, INT_MIN, INT_MAX, E, "avoid_negative_ts"},
{"make_non_negative", "shift timestamps so they are non negative", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_AVOID_NEG_TS_MAKE_NON_NEGATIVE }, INT_MIN, INT_MAX, E, "avoid_negative_ts"},
{"make_zero", "shift timestamps so they start at 0", 0, AV_OPT_TYPE_CONST, {.i64 = AVFMT_AVOID_NEG_TS_MAKE_ZERO }, INT_MIN, INT_MAX, E, "avoid_negative_ts"},
+{"protocol_blacklist", "A comma-separated list of blacklisted protocols used for opening files internally by lavf",
+ OFFSET(protocol_blacklist), AV_OPT_TYPE_STRING, { .str = "concat" }, .flags = E | D },
+{"protocol_whitelist", "A comma-separated list of whitelisted protocols used for opening files internally by lavf",
+ OFFSET(protocol_whitelist), AV_OPT_TYPE_STRING, { .str = NULL }, .flags = E | D },
{NULL},
};