[FFmpeg-cvslog] vp9: read reserved bit in RGB header.

Ronald S. Bultje git at videolan.org
Fri Sep 4 16:07:47 CEST 2015


ffmpeg | branch: master | Ronald S. Bultje <rsbultje at gmail.com> | Wed Sep  2 14:35:03 2015 -0400| [ecd9f57edcbdbef057724e164d8e67bf8b489f01] | committer: Ronald S. Bultje

vp9: read reserved bit in RGB header.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ecd9f57edcbdbef057724e164d8e67bf8b489f01
---

 libavcodec/vp9.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index 95af94b..e3593e7 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);



More information about the ffmpeg-cvslog mailing list