This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 4ed2f60e1b30eeaa97535f60d857d2b613cbff76
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Thu Oct 15 04:17:31 2026 +0200
Commit:     michaelni <[email protected]>
CommitDate: Sat Oct 24 20:19:14 2026 +0000

    avcodec/flacenc: clamp the minimum LPC prediction order to 1
    
    This is not a security issue.
    
    Fixes: Qzx1V8a6y8DL
    Fixes: 
swarm-Out-of-bounds-reads-on-coefs-shift-bits-when-min_prediction_order-is-0-0468ca
    
    Found-by: zhang xingxing <[email protected]>
    The report suggested ensuring min_order >= 1.
    
    Out of array write Replicated through UnModified FFmpeg with ASAN
    
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavcodec/flacenc.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c
index ead2c55f10..8d1c76870e 100644
--- a/libavcodec/flacenc.c
+++ b/libavcodec/flacenc.c
@@ -401,6 +401,11 @@ static av_cold int flac_encode_init(AVCodecContext *avctx)
                    s->options.max_prediction_order, MAX_FIXED_ORDER);
             s->options.max_prediction_order = MAX_FIXED_ORDER;
         }
+    } else if (s->options.min_prediction_order < MIN_LPC_ORDER) {
+        av_log(avctx, AV_LOG_WARNING,
+               "invalid min prediction order %d, clamped to %d\n",
+               s->options.min_prediction_order, MIN_LPC_ORDER);
+        s->options.min_prediction_order = MIN_LPC_ORDER;
     }
 
     if (s->options.max_prediction_order < s->options.min_prediction_order) {

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to