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>
Thu, 26 Nov 2015 15:05:41 +0000 (16:05 +0100)
commit6af38b2718bd0d6f8b0cbe1d6deac8028d3f1fea
tree11a3185208c4d5820531e3b49f1cf97ecefa2cbf
parent0ce7baa2451b52d0610b93a6db287989f8e2cb73
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