vp9: read reserved bit in RGB header.
authorRonald S. Bultje <rsbultje@gmail.com>
Wed, 2 Sep 2015 18:35:03 +0000 (14:35 -0400)
committerRonald S. Bultje <rsbultje@gmail.com>
Fri, 4 Sep 2015 13:33:45 +0000 (09:33 -0400)
libavcodec/vp9.c

index 95af94b..e3593e7 100644 (file)
@@ -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);