This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 52190efade955236b145de178c7f1a89231cbbd5 Author: Andreas Rheinhardt <[email protected]> AuthorDate: Mon Dec 29 21:47:44 2025 +0100 Commit: Andreas Rheinhardt <[email protected]> CommitDate: Sun Jan 4 15:49:30 2026 +0100 avutil/crc: Don't assert AVCRCId to be valid This function is supposed to return NULL on failure. Signed-off-by: Andreas Rheinhardt <[email protected]> --- libavutil/crc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavutil/crc.c b/libavutil/crc.c index 703b56f4e0..34f507ead8 100644 --- a/libavutil/crc.c +++ b/libavutil/crc.c @@ -373,6 +373,8 @@ int av_crc_init(AVCRC *ctx, int le, int bits, uint32_t poly, int ctx_size) const AVCRC *av_crc_get_table(AVCRCId crc_id) { + if ((unsigned)crc_id >= AV_CRC_MAX) + return NULL; #if !CONFIG_HARDCODED_TABLES switch (crc_id) { case AV_CRC_8_ATM: CRC_INIT_TABLE_ONCE(AV_CRC_8_ATM); break; @@ -383,7 +385,7 @@ const AVCRC *av_crc_get_table(AVCRCId crc_id) case AV_CRC_32_IEEE: CRC_INIT_TABLE_ONCE(AV_CRC_32_IEEE); break; case AV_CRC_32_IEEE_LE: CRC_INIT_TABLE_ONCE(AV_CRC_32_IEEE_LE); break; case AV_CRC_16_ANSI_LE: CRC_INIT_TABLE_ONCE(AV_CRC_16_ANSI_LE); break; - default: av_assert0(0); + default: av_unreachable("already checked"); } #endif return av_crc_table[crc_id]; _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
