From ecd9f57edcbdbef057724e164d8e67bf8b489f01 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Wed, 2 Sep 2015 14:35:03 -0400 Subject: [PATCH] vp9: read reserved bit in RGB header. --- libavcodec/vp9.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c index 95af94b29ba..e3593e7332c 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); -- 2.39.2