Commit 61db65d382 for ffmpeg
commit 61db65d3825e9923de1ed31a1bdb78ba3b60fc2e
Author: Michael Niedermayer <michael@niedermayer.cc>
Date: Wed Oct 7 06:05:14 2026 +0200
avformat/vvc: Infer the level of the highest sublayer from general_level_idc
Not a security issue, the read stays inside the configuration record and
the inferred level is not written.
Fixes: CSTqrrUsg2ce
Array index out of bounds Replicated through API with UBSAN
Found during triage of the security report IUOlTN86QoY1
diff --git a/libavformat/vvc.c b/libavformat/vvc.c
index 7c711cb783..f2e860ef4d 100644
--- a/libavformat/vvc.c
+++ b/libavformat/vvc.c
@@ -156,7 +156,7 @@ static void vvcc_update_ptl(VVCDecoderConfigurationRecord *vvcc,
FFMAX(vvcc->ptl.sublayer_level_idc[i],
ptl->sublayer_level_idc[i]);
} else {
- if (i == vvcc->num_sublayers - 1) {
+ if (i == vvcc->num_sublayers - 2) {
vvcc->ptl.sublayer_level_idc[i] = vvcc->ptl.general_level_idc;
} else {
vvcc->ptl.sublayer_level_idc[i] =