Commit 2787f7b1 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '34e6af9e'

* commit '34e6af9e':
  indeo3: fix data size check
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 4029a5eb 34e6af9e
......@@ -916,7 +916,6 @@ static int decode_frame_headers(Indeo3DecodeContext *ctx, AVCodecContext *avctx,
/* parse the bitstream header */
bs_hdr = gb.buffer;
buf_size -= 16;
if (bytestream2_get_le16(&gb) != 32) {
av_log(avctx, AV_LOG_ERROR, "Unsupported codec version!\n");
......@@ -930,8 +929,7 @@ static int decode_frame_headers(Indeo3DecodeContext *ctx, AVCodecContext *avctx,
if (ctx->data_size == 16)
return 4;
if (ctx->data_size > buf_size)
ctx->data_size = buf_size;
ctx->data_size = FFMIN(ctx->data_size, buf_size - 16);
bytestream2_skip(&gb, 3); // skip reserved byte and checksum
......
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