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

Git pushed a commit to branch master
in repository ffmpeg.

commit 49f214e2a86f678062b9834a7f4769ccb3eb8890
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Sat Oct 10 04:50:51 2026 +0200
Commit:     michaelni <[email protected]>
CommitDate: Mon Oct 12 23:55:55 2026 +0000

    avcodec/jpeg2000htdec: apply the ROI shift as an unsigned shift
    
    Undefined shift Replicated through UnModified FFmpeg with UBSAN
    
    Fixes: left shift of 448 by 23 places cannot be represented in type 
'int32_t'
    Fixes: 
538245301/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_DEC_fuzzer-5803355348467712
    Fixes: QvL1tuhWgRGM
    
    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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/jpeg2000htdec.c b/libavcodec/jpeg2000htdec.c
index 5b12062f40..9464eba75d 100644
--- a/libavcodec/jpeg2000htdec.c
+++ b/libavcodec/jpeg2000htdec.c
@@ -1337,7 +1337,7 @@ ff_jpeg2000_decode_htj2k(const Jpeg2000DecoderContext *s, 
Jpeg2000CodingStyle *c
             if (roi_shift && (((uint32_t)val & ~mask) == 0)) {
                 if ((32 - ff_clz(val | 1)) < roi_shift)
                     // Assuming that the internal precision for codeblock 
decoding is 32 bits.
-                    val <<= roi_shift;
+                    val = (uint32_t)val << roi_shift;
                 else {
                     av_log(s->avctx, AV_LOG_ERROR,
                         "Pixel precision in ROI is beyond the supported 
range.\n"

-- 
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