From 07cd30a1cae34560e8d39be318847669c7306573 Mon Sep 17 00:00:00 2001 From: Francois Cartegnie Date: Sun, 10 Jul 2022 21:19:01 +0200 Subject: [PATCH] packetizer: flac: do not check min frame size for fixed block cannot pass on truncated end (cherry picked from commit 1db4d294ca8185e5a9e25d823c40677831d9f538) --- modules/packetizer/flac.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/packetizer/flac.h b/modules/packetizer/flac.h index f04d7fae9a..54b36c0211 100644 --- a/modules/packetizer/flac.h +++ b/modules/packetizer/flac.h @@ -121,7 +121,8 @@ static inline int FLAC_CheckFrameInfo(const struct flac_stream_info *stream_info /* Sanity check using stream info header when possible */ if (stream_info) { - if (h->i_frame_length < stream_info->min_blocksize || + if ((stream_info->min_blocksize != stream_info->max_blocksize && + h->i_frame_length < stream_info->min_blocksize) || h->i_frame_length > stream_info->max_blocksize) return 0; if (h->i_bits_per_sample != stream_info->bits_per_sample)