aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2015-09-02 14:35:03 -0400
committerRonald S. Bultje <rsbultje@gmail.com>2015-09-04 09:33:45 -0400
commitecd9f57edcbdbef057724e164d8e67bf8b489f01 (patch)
treea3fe3017ac60903ddb466b4aaeb36c780df288a7 /libavcodec
parent48f641a18b841c8704b741b59ae71e4bc129e07f (diff)
downloadffmpeg-ecd9f57edcbdbef057724e164d8e67bf8b489f01.tar.gz
vp9: read reserved bit in RGB header.
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/vp9.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index 95af94b29b..e3593e7332 100644
--- a/libavcodec/vp9.c
+++ b/libavcodec/vp9.c
@@ -503,6 +503,10 @@ static enum AVPixelFormat read_colorspace_details(AVCodecContext *ctx)
s->ss_h = s->ss_v = 1;
res = pix_fmt_rgb[bits];
ctx->color_range = AVCOL_RANGE_JPEG;
+ if (get_bits1(&s->gb)) {
+ av_log(ctx, AV_LOG_ERROR, "Reserved bit set in RGB\n");
+ return AVERROR_INVALIDDATA;
+ }
} else {
av_log(ctx, AV_LOG_ERROR, "RGB not supported in profile %d\n",
ctx->profile);