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 21:51:30 +0000 (22:51 +0100)
commita105f52855d08e4ab1ed7306da8e32fc90d6d647
tree9a7d0fa5102c35da1fea1a8e9f3e68a08138909e
parent603ebab8d7b789cd3cb6c7ca645a7badb5b950b4
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>
libavcodec/error_resilience.c