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>
Sun, 6 Dec 2015 11:40:49 +0000 (12:40 +0100)
commit3879202d68ce327416806f650f3d8bf63a4cd83a
tree341b2261575e6576fe3635246315a415fe819819
parent99e080ec38eec8e8e0ca3b404d86c4526ed57d74
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