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

Git pushed a commit to branch master
in repository ffmpeg.

commit 20b8812f5cd9a2fb7a8c6468a53fa2b174c17542
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Sat Oct 10 07:13:43 2026 +0200
Commit:     michaelni <[email protected]>
CommitDate: Thu Nov 5 23:03:11 2026 +0000

    avcodec/cbs_h266: reject an empty SPS conformance window
    
    Fixes: heap-buffer-overflow (read)
    Fixes: q0RFgfMenefI
    Fixes: ANT-2026-HRT03RV0
    Fixes: vvc-subpic-tiles.mkv
    Found-by: Claude and Ada Logics
    
    Out of array read Replicated through UnModified FFmpeg with ASAN
---
 libavcodec/cbs_h266_syntax_template.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/libavcodec/cbs_h266_syntax_template.c 
b/libavcodec/cbs_h266_syntax_template.c
index e11799c2e5..ba64139a97 100644
--- a/libavcodec/cbs_h266_syntax_template.c
+++ b/libavcodec/cbs_h266_syntax_template.c
@@ -1116,12 +1116,12 @@ static int FUNC(sps)(CodedBitstreamContext *ctx, 
RWContext *rw,
 
     flag(sps_conformance_window_flag);
     if (current->sps_conformance_window_flag) {
-        uint16_t width = current->sps_pic_width_max_in_luma_samples / 
sub_width_c;
-        uint16_t height = current->sps_pic_height_max_in_luma_samples / 
sub_height_c;
-        ue(sps_conf_win_left_offset, 0, width);
-        ue(sps_conf_win_right_offset, 0, width - 
current->sps_conf_win_left_offset);
-        ue(sps_conf_win_top_offset, 0, height);
-        ue(sps_conf_win_bottom_offset, 0, height - 
current->sps_conf_win_top_offset);
+        uint16_t max_offsets_x = (current->sps_pic_width_max_in_luma_samples - 
1) / sub_width_c;
+        uint16_t max_offsets_y = (current->sps_pic_height_max_in_luma_samples 
- 1) / sub_height_c;
+        ue(sps_conf_win_left_offset, 0, max_offsets_x);
+        ue(sps_conf_win_right_offset, 0, max_offsets_x - 
current->sps_conf_win_left_offset);
+        ue(sps_conf_win_top_offset, 0, max_offsets_y);
+        ue(sps_conf_win_bottom_offset, 0, max_offsets_y - 
current->sps_conf_win_top_offset);
     } else {
         infer(sps_conf_win_left_offset, 0);
         infer(sps_conf_win_right_offset, 0);

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