avcodec/cbs_h266: reject SPS virtual boundaries when the resolution may change

Fixes: negative-size-param
Fixes: left shift of negative value
Fixes: 0IMcpiRlVAb5
Fixes: ANT-2026-QY2HYS5A
Fixes: poc.mkv
Found-by: Claude and Ada Logics

Negative size memcpy Replicated through UnModified FFmpeg with ASAN and UBSAN
This commit is contained in:
Michael Niedermayer authored and michaelni committed 2026-11-05 23:03:11 +00:00
1 parent 20b8812f5c
commit 67f9665f8e
1 file changed
+1 -1
+1 -1
View File
@@ -1587,7 +1587,7 @@ static int FUNC(sps)(CodedBitstreamContext *ctx, RWContext *rw,
flag(sps_virtual_boundaries_enabled_flag);
if (current->sps_virtual_boundaries_enabled_flag) {
flag(sps_virtual_boundaries_present_flag);
u(1, sps_virtual_boundaries_present_flag, 0, !current->sps_res_change_in_clvs_allowed_flag);
if (current->sps_virtual_boundaries_present_flag) {
ue(sps_num_ver_virtual_boundaries,
0, current->sps_pic_width_max_in_luma_samples <= 8 ? 0 : VVC_MAX_VBS);