mss2: only use error correction for matching block counts
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Thu, 24 Nov 2016 22:57:46 +0000 (23:57 +0100)
committerAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Sat, 26 Nov 2016 23:46:36 +0000 (00:46 +0100)
commit028c87be95dd85329f5c68d78e152d859afec7e9
tree777b7f9b3886fe937dc047b8cf9a9a69e5b93f1b
parentb45e112bbdcc44a96907662136e49514a204543a
mss2: only use error correction for matching block counts

This fixes a heap-buffer-overflow in ff_er_frame_end when decoding mss2
with coded_width/coded_height larger than width/height.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 2566ad98b01538ea589e5ee07b69fc566aadc348)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
libavcodec/mss2.c