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

Git pushed a commit to branch master
in repository ffmpeg.

The following commit(s) were added to refs/heads/master by this push:
     new 99515a3342 avcodec/jpeg2000htdec: Check Lcup and Lref
99515a3342 is described below

commit 99515a3342339457b53a48f3644c919510a5ba7e
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Sat Feb 7 22:55:11 2026 +0100
Commit:     michaelni <[email protected]>
CommitDate: Sun Feb 22 02:31:06 2026 +0000

    avcodec/jpeg2000htdec: Check Lcup and Lref
    
    Fixes: use of uninitialized memory
    Fixes: 
482494999/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_DEC_fuzzer-6467586186608640
    
    Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavcodec/jpeg2000htdec.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavcodec/jpeg2000htdec.c b/libavcodec/jpeg2000htdec.c
index b92f0131a4..ebfb8c1a8f 100644
--- a/libavcodec/jpeg2000htdec.c
+++ b/libavcodec/jpeg2000htdec.c
@@ -1254,6 +1254,11 @@ ff_jpeg2000_decode_htj2k(const Jpeg2000DecoderContext 
*s, Jpeg2000CodingStyle *c
                "Cleanup pass length must be at least 2 bytes in length\n");
         return AVERROR_INVALIDDATA;
     }
+    // this might arise either if the codestream is corrupted; or contains 
multiple HT Sets
+    // (see Rec. ITU-T T.814, Annex B.1), which the parser does not currently 
support
+    if (Lcup + Lref != cblk->length)
+        return AVERROR_INVALIDDATA;
+
     Dcup = cblk->data;
     Dref  = cblk->data + Lcup; // Dref comes after the refinement segment
 

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

Reply via email to