avcodec/tdsc: Better input size check

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer
2026-04-08 13:49:28 +02:00
committed by michaelni
parent bb69a090a7
commit bf4eb194cf
+1 -1
View File
@@ -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);