flicvideo: fix crash on flic files with invalid frame size
authorStefano Sabatini <stefano.sabatini-lala@poste.it>
Fri, 22 Apr 2011 22:08:28 +0000 (00:08 +0200)
committerStefano Sabatini <stefano.sabatini-lala@poste.it>
Sat, 23 Apr 2011 10:13:20 +0000 (12:13 +0200)
commitefd6cbc5ddac2d4df7008733bfef1d6d6809cc3c
treed6056ea412d71b130ea92a201351c4ab0e860b7c
parentcd1872799d89a87b1d06132118836c82cda2a44f
flicvideo: fix crash on flic files with invalid frame size

Add a check in flic_decode_frame_8BPP(), in case chunk_size is >
frame_size issue a warning and resize chunk_size to frame_size, in
order to avoid out-of-buffer reads.

Fix roundup issue #2520, trac issue #69.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
libavcodec/flicvideo.c