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>
Tue, 13 Mar 2012 22:23:58 +0000 (23:23 +0100)
commit9cb7f6e54a426e132396548a745cb32ff825b1fa
treea982b82879fa057684c9301576885334355efb5c
parented6aaf579db01d114d6198257fb734e20bc09f42
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