avcodec/pngdec: Check bits per pixel before setting monoblack pixel format
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 3 Oct 2014 15:35:58 +0000 (17:35 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 12 Mar 2015 17:03:48 +0000 (18:03 +0100)
commit7238c744de4254973d3b04550c5764fd6bfc8267
tree2d605ef16c53b0054dcd91951862a96f97eabc0f
parent7c1150bf05cd4f3c216fbe3441894a567a18f2ee
avcodec/pngdec: Check bits per pixel before setting monoblack pixel format

Fixes out of array accesses
Fixes: asan_heap-oob_14dbfcf_4_asan_heap-oob_1ce5767_179_add_method_small.png

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3e2b745020c2dbf0201fe7df3dad9e7e0b2e1bb6)

Conflicts:

libavcodec/pngdec.c
libavcodec/pngdec.c