[FFmpeg-cvslog] avcodec/vorbisdec: Check codebook float values to be finite
Michael Niedermayer
git at videolan.org
Mon Oct 30 02:09:29 EET 2023
ffmpeg | branch: release/5.1 | Michael Niedermayer <michael at niedermayer.cc> | Sun Feb 12 22:49:01 2023 +0100| [efcb8211577b47a21ac0ab8ba2b8597be93ee0c2] | committer: Michael Niedermayer
avcodec/vorbisdec: Check codebook float values to be finite
Fixes: Timeout
Fixes: 55116/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VORBIS_fuzzer-4572159970508800
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit cadd7e7a7589b5c118ad1648a09c629a6b65a3be)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=efcb8211577b47a21ac0ab8ba2b8597be93ee0c2
---
libavcodec/vorbisdec.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c
index 6ba0e1d811..269a6eb166 100644
--- a/libavcodec/vorbisdec.c
+++ b/libavcodec/vorbisdec.c
@@ -364,6 +364,10 @@ static int vorbis_parse_setup_hdr_codebooks(vorbis_context *vc)
unsigned codebook_value_bits = get_bits(gb, 4) + 1;
unsigned codebook_sequence_p = get_bits1(gb);
+ if (!isfinite(codebook_minimum_value) || !isfinite(codebook_delta_value)) {
+ ret = AVERROR_INVALIDDATA;
+ goto error;
+ }
ff_dlog(NULL, " We expect %d numbers for building the codevectors. \n",
codebook_lookup_values);
ff_dlog(NULL, " delta %f minmum %f \n",
More information about the ffmpeg-cvslog
mailing list