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

Git pushed a commit to branch master
in repository ffmpeg.

commit f9740eb969eb669d1985b0f98e0979e4b7ce2894
Author:     Frank Plowman <[email protected]>
AuthorDate: Sat Jan 24 13:21:00 2026 +0000
Commit:     frankplow <[email protected]>
CommitDate: Sat Jan 31 13:46:13 2026 +0000

    lavc/vvc: Fix unchecked error codes from set_qp_y
    
    Fixes: 
clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VVC_fuzzer-4957602162475008
---
 libavcodec/vvc/ctu.c | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/libavcodec/vvc/ctu.c b/libavcodec/vvc/ctu.c
index 18cbe0fe0f..e50ac592bd 100644
--- a/libavcodec/vvc/ctu.c
+++ b/libavcodec/vvc/ctu.c
@@ -1157,8 +1157,11 @@ static int skipped_transform_tree_unit(VVCLocalContext 
*lc)
     const CodingUnit *cu   = lc->cu;
     int ret;
 
-    if (cu->tree_type != DUAL_TREE_CHROMA)
-        set_qp_y(lc, cu->x0, cu->y0, 0);
+    if (cu->tree_type != DUAL_TREE_CHROMA) {
+        ret = set_qp_y(lc, cu->x0, cu->y0, 0);
+        if (ret < 0)
+            return ret;
+    }
     if (rsps->sps_chroma_format_idc && cu->tree_type != DUAL_TREE_LUMA)
         set_qp_c(lc);
     ret = skipped_transform_tree(lc, cu->x0, cu->y0, cu->cb_width, 
cu->cb_height);
@@ -1937,17 +1940,20 @@ static void palette_update_predictor(VVCLocalContext 
*lc, const bool local_dual_
     }
 }
 
-static void palette_qp(VVCLocalContext *lc, VVCTreeType tree_type, const bool 
escape_present)
+static int palette_qp(VVCLocalContext *lc, VVCTreeType tree_type, const bool 
escape_present)
 {
     const VVCFrameContext *fc     = lc->fc;
     const VVCPPS *pps             = fc->ps.pps;
     const H266RawSliceHeader *rsh = lc->sc->sh.r;
     const CodingUnit *cu          = lc->cu;
+    int ret;
 
     if (tree_type != DUAL_TREE_CHROMA) {
         const bool has_qp_delta = escape_present &&
             pps->r->pps_cu_qp_delta_enabled_flag && 
!lc->parse.is_cu_qp_delta_coded;
-        set_qp_y(lc, cu->x0, cu->y0, has_qp_delta);
+        ret = set_qp_y(lc, cu->x0, cu->y0, has_qp_delta);
+        if (ret < 0)
+            return ret;
     }
 
     if (tree_type != DUAL_TREE_LUMA) {
@@ -1955,6 +1961,8 @@ static void palette_qp(VVCLocalContext *lc, VVCTreeType 
tree_type, const bool es
             chroma_qp_offset_decode(lc, 0, 1);
         set_qp_c(lc);
     }
+
+    return 0;
 }
 
 #define PALETTE_SET_PIXEL(xc, yc, pix)                              \
@@ -2123,7 +2131,9 @@ static int hls_palette_coding(VVCLocalContext *lc, const 
VVCTreeType tree_type)
         transpose = ff_vvc_palette_transpose_flag(lc);
     }
 
-    palette_qp(lc, tree_type, escape_present);
+    ret = palette_qp(lc, tree_type, escape_present);
+    if (ret < 0)
+        return ret;
 
     index[0] = 0;
     for (int i = 0; i <= (tu->tbs[0].tb_width * tu->tbs[0].tb_height - 1) >> 
4; i++) {

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to