[libav-commits] vp6: properly fail on unsupported feature

Luca Barbato git at libav.org
Sat Jan 12 20:10:22 CET 2013


Module: libav
Branch: release/0.7
Commit: 4ede95e69cf964cd46b1e9fcd48da80d8d92c433

Author:    Luca Barbato <lu_zero at gentoo.org>
Committer: Reinhard Tartler <siretart at tauware.de>
Date:      Thu Dec 13 16:20:19 2012 +0100

vp6: properly fail on unsupported feature

Interlacing is not supported at all and mismanaged down the normal
codepaths causing possible buffer management issues.

Fixes: CVE-2012-2783
(cherry picked from commit be75fed9755c1285ba084574aff2d7ee0f81110d)

Signed-off-by: Reinhard Tartler <siretart at tauware.de>

---

 libavcodec/vp6.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/vp6.c b/libavcodec/vp6.c
index 7347f9f..309e856 100644
--- a/libavcodec/vp6.c
+++ b/libavcodec/vp6.c
@@ -62,8 +62,8 @@ static int vp6_parse_header(VP56Context *s, const uint8_t *buf, int buf_size,
             return AVERROR_INVALIDDATA;
         s->filter_header = buf[1] & 0x06;
         if (buf[1] & 1) {
-            av_log(s->avctx, AV_LOG_ERROR, "interlacing not supported\n");
-            return 0;
+            av_log_missing_feature(s->avctx, "Interlacing", 0);
+            return AVERROR_PATCHWELCOME;
         }
         if (separated_coeff || !s->filter_header) {
             coeff_offset = AV_RB16(buf+2) - 2;



More information about the libav-commits mailing list