mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Merge commit '34e6af9e204ca6bb18d8cf8ec68fe19b0e083e95'
* commit '34e6af9e204ca6bb18d8cf8ec68fe19b0e083e95': indeo3: fix data size check Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
2787f7b188
@ -916,7 +916,6 @@ static int decode_frame_headers(Indeo3DecodeContext *ctx, AVCodecContext *avctx,
|
|||||||
|
|
||||||
/* parse the bitstream header */
|
/* parse the bitstream header */
|
||||||
bs_hdr = gb.buffer;
|
bs_hdr = gb.buffer;
|
||||||
buf_size -= 16;
|
|
||||||
|
|
||||||
if (bytestream2_get_le16(&gb) != 32) {
|
if (bytestream2_get_le16(&gb) != 32) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "Unsupported codec version!\n");
|
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)
|
if (ctx->data_size == 16)
|
||||||
return 4;
|
return 4;
|
||||||
if (ctx->data_size > buf_size)
|
ctx->data_size = FFMIN(ctx->data_size, buf_size - 16);
|
||||||
ctx->data_size = buf_size;
|
|
||||||
|
|
||||||
bytestream2_skip(&gb, 3); // skip reserved byte and checksum
|
bytestream2_skip(&gb, 3); // skip reserved byte and checksum
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user