Commit dd11615b authored by Michael Niedermayer's avatar Michael Niedermayer

ffv1dec: more completely check slice count

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent cb395929
...@@ -469,9 +469,10 @@ static int read_extra_header(FFV1Context *f) ...@@ -469,9 +469,10 @@ static int read_extra_header(FFV1Context *f)
f->num_h_slices = 1 + get_symbol(c, state, 0); f->num_h_slices = 1 + get_symbol(c, state, 0);
f->num_v_slices = 1 + get_symbol(c, state, 0); f->num_v_slices = 1 + get_symbol(c, state, 0);
if (f->num_h_slices > (unsigned)f->width || if (f->num_h_slices > (unsigned)f->width || !f->num_h_slices ||
f->num_v_slices > (unsigned)f->height) { f->num_v_slices > (unsigned)f->height || !f->num_v_slices
av_log(f->avctx, AV_LOG_ERROR, "too many slices\n"); ) {
av_log(f->avctx, AV_LOG_ERROR, "slice count invalid\n");
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
......
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