apng: use correct size for output buffer
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Fri, 6 Nov 2015 22:44:01 +0000 (23:44 +0100)
committerAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Sat, 7 Nov 2015 12:15:14 +0000 (13:15 +0100)
commit3e8e1a660ea182111057d56ec1cfad2c62250f4c
treeaed3cdcd453d018ed071f394aa5fd78ddd0118fb
parentdb374790c75fa4ef947abcb5019fcf21d0b2de85
apng: use correct size for output buffer

The buffer needs s->bpp bytes, at maximum currently 10.
Assert that s->bpp is not larger.

This fixes a stack buffer overflow.

Reviewed-by: wm4 <nfxjfg@googlemail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
libavcodec/pngdec.c