Test extradata size before reading from extradata when decoding avui.

(cherry picked from commit 83de4f5fc92b1424c7d77f3411572a9a00eff672)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Carl Eugen Hoyos 2012-05-28 15:58:46 +02:00 committed by Michael Niedermayer
parent 88a145738b
commit c4e3dd06e8

View File

@ -48,8 +48,8 @@ static int avui_decode_frame(AVCodecContext *avctx, void *data,
if (pic->data[0])
avctx->release_buffer(avctx, pic);
if (!memcmp(&avctx->extradata[4], "APRGAPRG0001", 12) &&
avctx->extradata_size >= 24)
if (avctx->extradata_size >= 24 &&
!memcmp(&avctx->extradata[4], "APRGAPRG0001", 12))
interlaced = avctx->extradata[19] != 1;
if (avctx->height == 486) {
skip = 10;