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

Git pushed a commit to branch master
in repository ffmpeg.

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

    avcodec/tiff: compute the DNG tile count without overflowing
    
    Signed integer overflow Replicated through API with UBSAN
    
    Fixes: signed integer overflow: 8224 + 2147483647 cannot be represented in 
type 'int'
    Fixes: 
554665253/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_DEC_fuzzer-5826816041091072
    Fixes: CiA9e8B5xODW
    
    Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavcodec/tiff.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index d6db7ef519..41db29d6e2 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -1004,8 +1004,8 @@ static int dng_decode_tiles(AVCodecContext *avctx, 
AVFrame *frame,
     has_height_leftover = (s->height % s->tile_length != 0);
 
     /* Calculate tile counts (round up) */
-    tile_count_x = (s->width + s->tile_width - 1) / s->tile_width;
-    tile_count_y = (s->height + s->tile_length - 1) / s->tile_length;
+    tile_count_x = (s->width - 1) / s->tile_width + 1;
+    tile_count_y = (s->height - 1) / s->tile_length + 1;
 
     /* Iterate over the number of tiles */
     for (tile_idx = 0; tile_idx < tile_count_x * tile_count_y; tile_idx++) {

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