avcodec/tiertexseqv: keep the block pointer within the block

A code table whose lengths add up to more than the block size advanced
dst and dst_size past the end of the block. The copies were already
limited to the block, so no memory was written out of bounds, but forming
a pointer beyond one past the end of an array is undefined behaviour.

This is not a security issue.
This commit is contained in:
Michael Niedermayer authored and michaelni committed 2026-11-05 22:51:06 +00:00
1 parent acbf987d7b
commit 201a2994d3
1 file changed
+1
+1
View File
@@ -69,6 +69,7 @@ static const unsigned char *seq_unpack_rle_block(const unsigned char *src,
memcpy(dst, src, FFMIN(len, dst_size));
src += len;
}
len = FFMIN(len, dst_size);
dst += len;
dst_size -= len;
}