Commit fa5dacce authored by Michael Niedermayer's avatar Michael Niedermayer

indeo5: check against scaleable frames in non scaleable streams.

Fixes a null ptr dereference.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 2a59abf1
...@@ -356,6 +356,12 @@ static int decode_pic_hdr(IVI5DecContext *ctx, AVCodecContext *avctx) ...@@ -356,6 +356,12 @@ static int decode_pic_hdr(IVI5DecContext *ctx, AVCodecContext *avctx)
ctx->gop_invalid = 0; ctx->gop_invalid = 0;
} }
if (ctx->frame_type == FRAMETYPE_INTER_SCAL && !ctx->is_scalable) {
av_log(avctx, AV_LOG_ERROR, "Scalable inter frame in non scaleable stream\n");
ctx->frame_type = FRAMETYPE_INTER;
return AVERROR_INVALIDDATA;
}
if (ctx->frame_type != FRAMETYPE_NULL) { if (ctx->frame_type != FRAMETYPE_NULL) {
ctx->frame_flags = get_bits(&ctx->gb, 8); ctx->frame_flags = get_bits(&ctx->gb, 8);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment