diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-03-10 00:08:32 +0100 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2012-03-14 13:24:31 -0700 |
commit | c9837954e7b968d44f82e7cdb7618e9f523b196c (patch) | |
tree | 752b89befcfa42b00cf6b7c0d8e38c6c105c187f /libavcodec | |
parent | 92a02d935bb73b3d5e5dcae990ffdafc7262bbd6 (diff) | |
download | ffmpeg-c9837954e7b968d44f82e7cdb7618e9f523b196c.tar.gz |
snow: reject unsupported chroma shifts.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/snowdec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/snowdec.c b/libavcodec/snowdec.c index 1dccc638d8..58a80b39c6 100644 --- a/libavcodec/snowdec.c +++ b/libavcodec/snowdec.c @@ -327,6 +327,11 @@ static int decode_header(SnowContext *s){ return -1; } + if (s->chroma_h_shift != 1 || s->chroma_v_shift != 1) { + av_log(s->avctx, AV_LOG_ERROR, "Invalid chroma shift\n"); + return AVERROR_PATCHWELCOME; + } + s->qlog += get_symbol(&s->c, s->header_state, 1); s->mv_scale += get_symbol(&s->c, s->header_state, 1); s->qbias += get_symbol(&s->c, s->header_state, 1); |