Commit c9837954 authored by Michael Niedermayer's avatar Michael Niedermayer Committed by Ronald S. Bultje

snow: reject unsupported chroma shifts.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: 's avatarRonald S. Bultje <rsbultje@gmail.com>
parent 92a02d93
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment