PR #24392 opened by michaelni
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24392
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24392.patch

Fixes: #22845
Fixes: Assertion failure
Fixes: out of array access

Signed-off-by: Michael Niedermayer <[email protected]>



>From 752518568e3a937cb70de0ee373d73518bac77de Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <[email protected]>
Date: Mon, 7 Sep 2026 00:11:34 +0200
Subject: [PATCH] avcodec/vorbisenc: dont assert on non finite input

Fixes: #22845
Fixes: Assertion failure
Fixes: out of array access

Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavcodec/vorbisenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/vorbisenc.c b/libavcodec/vorbisenc.c
index fbb51b929d..7e72c19c5d 100644
--- a/libavcodec/vorbisenc.c
+++ b/libavcodec/vorbisenc.c
@@ -895,7 +895,7 @@ static int floor_encode(vorbis_enc_context *venc, 
vorbis_enc_floor *fc,
 static float *put_vector(vorbis_enc_codebook *book, PutBitContext *pb,
                          float *num)
 {
-    int i, entry = -1;
+    int i, entry = 0;
     float distance = FLT_MAX;
     assert(book->dimensions);
     for (i = 0; i < book->nentries; i++) {
-- 
2.52.0

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to