1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

snow: reject unsupported chroma shifts.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-03-10 00:08:32 +01:00
parent aefd1cb725
commit 1af9fdc3ba

View File

@ -336,6 +336,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);