raw: move buffer size check up.
authorRonald S. Bultje <rsbultje@gmail.com>
Wed, 7 Mar 2012 00:08:10 +0000 (16:08 -0800)
committerReinhard Tartler <siretart@tauware.de>
Sun, 1 Apr 2012 16:33:29 +0000 (18:33 +0200)
commit4924520513d06b4d9169a1d3e0374d5a48bc02e0
treef8c1dce590ab46b8e6cdc270c68d140548e26a36
parentf2e412d050ae9a0dcdea515f1c02620c6dcf8c47
raw: move buffer size check up.

This way, it protects against overreads for 4bpp/2bpp content also.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit cc5dd632cecc5114717d0b90f8c2be162b1c6ee8)

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
libavcodec/rawdec.c