This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch release/9.1 in repository ffmpeg.
commit d2f7b95ed1dd16a07073bdc2cac461309da70303 Author: Michael Niedermayer <[email protected]> AuthorDate: Sat Oct 10 07:13:43 2026 +0200 Commit: Michael Niedermayer <[email protected]> CommitDate: Sun Nov 15 05:26:01 2026 +0100 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 (cherry picked from commit 20b8812f5cd9a2fb7a8c6468a53fa2b174c17542) Signed-off-by: Michael Niedermayer <[email protected]> --- 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]
