This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch release/8.1 in repository ffmpeg.
commit 96f9a6e28cdaf0ea322a1f202ab7cdb0c38d7ec1 Author: James Almer <[email protected]> AuthorDate: Thu May 28 15:20:51 2026 -0300 Commit: Michael Niedermayer <[email protected]> CommitDate: Sun Jun 14 04:40:56 2026 +0200 tests/checkasm/crc: retain offset values between calls Should fix buffer overflows as reported by clang-asan and use of uninitialized values as reported by valgrind. Signed-off-by: James Almer <[email protected]> (cherry picked from commit 224659360a8b5d1a88d6af5be39f0ec88bb03cf9) Signed-off-by: Michael Niedermayer <[email protected]> --- tests/checkasm/crc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/checkasm/crc.c b/tests/checkasm/crc.c index 60d9ef6018..32a1aae3ab 100644 --- a/tests/checkasm/crc.c +++ b/tests/checkasm/crc.c @@ -44,17 +44,19 @@ static void check_crc(const AVCRC *table_new, const char *name, unsigned idx) return; DECLARE_ALIGNED(4, uint8_t, buf)[8192]; - size_t offset = rnd() & 31; + static size_t offsets[AV_CRC_MAX + 1]; static size_t sizes[AV_CRC_MAX + 1]; static unsigned sizes_initialized = 0; uint32_t prev_crc = rnd(); if (!(sizes_initialized & (1 << idx))) { sizes_initialized |= 1 << idx; - sizes[idx] = rnd() % (sizeof(buf) - 1 - offset); + offsets[idx] = rnd() & 31; + sizes[idx] = rnd() % (sizeof(buf) - 1 - offsets[idx]); } size_t size = sizes[idx]; + size_t offset = offsets[idx]; for (size_t j = 0; j < sizeof(buf); j += 4) AV_WN32A(buf + j, rnd()); _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
