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

mlpdec: Fix reading state with 0 bit elements.

This fixes an assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-03-28 03:53:08 +01:00
parent 10ece44d09
commit e234daa518

View File

@ -635,7 +635,7 @@ static int read_filter_params(MLPDecodeContext *m, GetBitContext *gbp,
/* TODO: Check validity of state data. */
for (i = 0; i < order; i++)
fp->state[i] = get_sbits(gbp, state_bits) << state_shift;
fp->state[i] = state_bits ? get_sbits(gbp, state_bits) << state_shift : 0;
}
}