diff --git a/libavcodec/tdsc.c b/libavcodec/tdsc.c index 985ed405fc..88ff575f99 100644 --- a/libavcodec/tdsc.c +++ b/libavcodec/tdsc.c @@ -403,7 +403,7 @@ static int tdsc_decode_tiles(AVCodecContext *avctx, int number_tiles) } tile_size = bytestream2_get_le32(&ctx->gbc); - if (bytestream2_get_bytes_left(&ctx->gbc) < tile_size) + if (bytestream2_get_bytes_left(&ctx->gbc) < tile_size + 24LL) return AVERROR_INVALIDDATA; tile_mode = bytestream2_get_le32(&ctx->gbc);