avcodec/error_resilience: avoid accessing previous or next frames tables beyond height
authorMichael Niedermayer <michael@niedermayer.cc>
Sat, 14 Nov 2015 20:11:52 +0000 (21:11 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Sat, 14 Nov 2015 22:04:54 +0000 (23:04 +0100)
commit196be9284a8d047254951c9f48b08b958349373b
treef90a5e334e53ee43aee29e3e46a34be70d3404bd
parentd61c3d1fca62b2497e4327af3ea50de5f7a8de0f
avcodec/error_resilience: avoid accessing previous or next frames tables beyond height

The height of tables can be rounded up for MBAFF but this does not imply that is also true
for the previous frames

Fixes out of array reads
Fixes: c106b36fa36db8ff8f3ed0c82be7bea2/asan_heap-oob_32699f0_6321_467b9a1d7e03d7cfd310b7e65dc53bcc.mov

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a105f52855d08e4ab1ed7306da8e32fc90d6d647)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/error_resilience.c